1.0.0 • Published 6 years ago
prettybits v1.0.0
📟 prettybits
Mini library for pretty printing bits and bytes.
This project was bootstrapped with this template.
Get started
npm install --save prettybitsor
yarn add prettybitsUsage
Pretty print bytes:
import { bytes } from 'prettybits';
console.log(bytes(-11234)); // > -11.2 kB
console.log(bytes(0)); // > 0 B
console.log(bytes(11234)); // > 11.2 kB
console.log(bytes(3284751)); // > 3.28 MBPretty print bits:
import { bits } from 'prettybits';
console.log(bits(-11234)); // > -11.2 kbit
console.log(bits(0)); // > 0 b
console.log(bits(11234)); // > 11.2 kbit
console.log(bits(3284751)); // > 3.28 MbitContributing
Thank you for wanting to contribute. Before you get started, read our contribution guidelines.
To get started, fork the repository and then clone it to your machine. You will need Node JS v8+ and NPM to run the project.
To grab all the dependencies for development:
npm installRun tests in watch mode:
npm test -wOnce you're happy with your changes, use Conventional Commits standard to create your commit messages.
To build the package, use the command:
npm buildIf all seems good and tests are green, push your changes and submit a pull request.
1.0.0
6 years ago