-
Fork the project and clone your fork.
-
Create a local feature branch:
$ git checkout -b <branch>
-
Add your Unit with name and base value to
var UNITS
inside an object with the same name as your type of unit of measurement. -
The
converter
object stores all methods used to convert an unit into another,basicConverterCreator(unitSymbol)
is a simples cross-multiplication, feel free to add a new function if you need something more sophisticated. -
Finally you need to put the name of the unit inside the object
helper
, using another curried function calledhelperCreator(unitSymbol, conversionType)
, with parameters used inconverter
andUNITS
-
Run
npm run build
-
Push to your fork:
$ git push origin <branch>
-
Open a pull request.