bit-formater
TypeScript icon, indicating that this package has built-in type declarations

0.9.7 • Public • Published

Typed Bit Formater Build Status

npm

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 bit-formater@0.5.0, then:

// typings.json
{
  "version": "0.5.0"
  // ...
}

Readme

Keywords

none

Package Sidebar

Install

npm i bit-formater

Weekly Downloads

1

Version

0.9.7

License

ISC

Last publish

Collaborators

  • oconnorct1