Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bit-formater

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bit-formater

Format bit input. Options of a function and class

  • 0.9.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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"
  // ...
}

FAQs

Package last updated on 21 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc