bit-formater
v0.9.7
Published
Format bit input. Options of a function and class
Downloads
14
Readme
Typed Bit Formater
Format bit input. Options of a function and class
LICENSE
MIT
install
NPM:
npm install bit-formater
How to Use
import { formatBytes, byteFormater } from 'bit-formater';
let x = formatBytes(234567543, 2);
let y = new byteFormater();
let r = y.add(12346765432);
console.log(r); // '12 GB 346 MB 765 KB and 432 Bytes downloaded'
r = y.add(93484952492834);
console.log(r); // '93 TB 496 GB 1298 MB 1258 KB and 1266 Bytes downloaded'
Contributing
# Fork this repo, then
npm install
npm run watch
# add tests, make changes, pass tests ... then [ctrl+c]
npm run publish
Updating
Update typings.json/version
to match the source version you are typing against.
e.g. if you are creating typings for [email protected]
, then:
// typings.json
{
"version": "0.5.0"
// ...
}