inventory-unit-converter
v1.0.3
Published
Unit converter basically used for developing inventory or SRM module in javascript
Downloads
8
Readme
unit-converter
Unit converter basically used for developing inventory or SRM module in javascript
USES
Example
const unitConverter = require('inventory-unit-converter');
const units = [ {name:'Roll', parentId:0, unitId:1, isLowest:0, value:1}, {name:'Metter', parentId:1, unitId:2, isLowest:0, value:10}, {name:'Feet', parentId:2, unitId:3, isLowest:0, value:10}, {name:'Inches', parentId:3, unitId:4, isLowest:1, value:10} ];
const value = 5001;
unitConverter(value, units);
Result: 5 Roll, 1 Inches