Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
jest.config.js
package-lock.json
package.json
tsconfig.json

README.md

Convert Unit

Convert values to the closest unit

Usage

npm install --save convert-unit
const { toClosestUnit } = require("convert-unit");

console.log(toClosestUnit(10000000));
// { value: 10, size: 'MB' }

Contributing

Enjoy!