Giter VIP home page Giter VIP logo

iroiro's Introduction

iroiro

tl;dr: I created it for a LINE chatbot that converts various units. I was tired of Googling and trying to convert values in my head whenever talking to Japanese friends so I put all the kinds of conversions I need to do in one place.

It's probably not very useful to someone who's not me, but I wanted it as a module so I could use it across a couple repos.

Types of conversions:

  • Japanese numbers <-> decimal: e.g. 10,000 => 10δΈ‡
  • JPY <-> USD
  • imperial <-> metric (right now, only distance)

Functionality

unitconverter does the overall functionality called by the LINE chatbot but the other packages can be used.

countingconverter package

Number parsing and conversion to JP units. Function to parse string in various formats (e.g. 135k, 1δΈ‡) and convert to a float, and function to convert to Japanese number. Uses stringutils for prettifying some outputs.

currencyconverter package

Utilities to convert from JPY <-> USD. It uses a rate passed in by caller.

measurementconverter package

Utilities to convert imperial to metric and vice versa. Uses stringutils for prettifying the output.

stringutils package

Utilities for trimming floats, and for adding commas to big numbers.

unitconverter package

Utilities for taking input and parsing whether it's only a number, a currency amount, or a measurement. Uses functions from counting, currencyconverter, distanceconverter and stringutils to both convert the values, and make them readable.

iroiro's People

Contributors

hsindorf avatar

Watchers

 avatar

iroiro's Issues

remove currency

this is too small to really be useful so its kind of just clutter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.