A minimal, zero-dependency byte formatter for Node.js. Version 1.1.0 is stable with no active development. It formats byte counts into human-readable strings (e.g., 100B, 1kB, 10.1MB) and includes a perSecond helper for rates. Unlike larger libraries like filesize or pretty-bytes, it has no configuration, one function, and is a single file – ideal for simple CLI tools or logging where minimalism is key.
npm install tiny-byte-sizeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage: import the default function, call with byte count. Also demonstrates perSecond for throughput.
Be aware that the formatting is decimal-based. If you need binary, use another library like 'filesize' or 'pretty-bytes'.
Only pass non-negative integer byte values.
Consider forking or using an alternative like 'filesize' if active maintenance is required.
Use require() in CommonJS or wrap with createRequire in ES modules.
Use `import byteSize from 'tiny-byte-size'` if your environment supports default imports for CommonJS, or use `const byteSize = require('tiny-byte-size')`.Run `npm install tiny-byte-size` and verify the spelling in your require/import statement.
Ensure you reference `byteSize.perSecond`, not `byteSize(1000).perSecond`. Example: `byteSize.perSecond(10101010)`.
No dependency data recorded yet.