Node.js module for converting between human-readable byte strings (for example, `1TB`, `1KB`) and numeric byte counts. Useful when you need to parse size inputs into bytes or format byte values back into strings with options like decimal places, thousands separators, and unit selection.
Project status
- Maintenance status: The repository shows at least one upstream push on 2024-07-05, indicating ongoing activity, but the last documented updates in the provided history are from 2022-01-28 (v3.1.2).
- Update cadence: Documented updates were in 2019 (v3.1.0), 2021 (v3.1.1), and 2022 (v3.1.2), suggesting infrequent changes rather than a steady release stream.
AI summary generated Today
Recent updates
3.1.2
1/28/2022Release 3.1.2 makes a small behavioral fix to how un-parsable byte strings are handled, ensuring they return null. It also bumps the mocha dev dependency and adjusts the CI Node.js 17 version.
Breaking3.1.1
11/15/2021Release 3.1.1 primarily fixes how `thousandsSeparator` is applied during byte formatting, preventing the fractional (decimal) part from being incorrectly modified. In addition, the project refreshes developer tooling (ESLint/Mocha/NYC) and replaces the previous Travis CI setup with a GitHub Actions workflow.
3.1.0
1/23/2019Release 3.1.0 was published on 2019-01-23, but no release notes were provided by the publisher. As a result, the change set (new features, bug fixes, breaking changes, dependency updates, security/performance improvements) cannot be determined from the release notes alone.
3.0.0
8/31/2017bytes 3.0.0 updates the byte formatting output to use the unit label "KB" instead of "kB", adjusts finite-number checking logic in the implementation, and drops support for older ecosystems. It also updates documentation/tests accordingly and modernizes some development tooling configuration.
2.5.0
3/25/2017Release 2.5.0 introduces support for a custom output unit in bytes.format via a new options.unit parameter. The release notes section is empty, so the actual runtime and packaging changes need to be inferred from the code diff and docs updates.
BreakingFeatures2.4.0
6/1/2016Version 2.4.0 introduces support for a new formatting option, unitSeparator, to control the delimiter between the numeric portion and the unit (for example, '1 kB' instead of '1kB'). The release notes section in the provided data is empty, so behavior changes must be inferred from the code diff and documentation updates.
Features2.3.0
2/16/2016Release 2.3.0 changes the core behavior of the bytes library around number validation and parsing. `bytes.format` now treats non-finite numbers as invalid, and `bytes.parse` now floors results (dropping partial bytes) and changes how certain non-matching strings are parsed.
Breaking2.2.0
11/14/2015Release 2.2.0 introduces new formatting options to control decimal precision for byte size strings, and updates documentation and tests accordingly. The code change also refactors the core bytes.format logic to use fixed decimal string formatting, and adds CI configuration via Travis.
Features2.1.0
5/22/2015Version 2.1.0 adds new public APIs on the main export, bytes.format and bytes.parse. The implementation is consolidated into index.js and the previously separate internal modules lib/byte-convert.js and lib/byte-parse.js were removed, with updated tests and packaging metadata.
BreakingFeatures2.0.2
5/21/2015Release 2.0.2 was published on 2015-05-21, but no release notes were provided by the publisher. As a result, this release cannot be assessed for developer impact (API changes, breaking changes, bug fixes, or security updates) from the provided information alone.