A extensible unit conversion library for Node.JS
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
var path = require('path');
|
|
|
var units = require('../../');
|
|
|
|
|
|
var db = path.join(path.dirname(module.filename), 'my_custom.units');
|
|
|
units.importDBSync(db);
|
|
|
|
|
|
console.dir(units.getUnitType('jong'));
|
|
|
console.dir(units.getUnitType('megajongs'));
|
|
|
|
|
|
console.log(units.convert('5 buttons to widgets'));
|
|
|
|
|
|
console.log(units.convert('30 jings to jong'));
|