bytesize mark

@theworker02/bytesize · JSR · 1.2.0

bytesize

A small runtime-neutral toolkit for SI and IEC byte sizes.

1.2.0JSRMITUniversal API

Overview

bytesize handles parsing, formatting, conversion, validation, and unit introspection without platform-specific APIs. Version 1.2.0 adds structured unit metadata and richer generated symbol docs.

Structured API

Canonical package: @theworker02/bytesize

import { parseSize, formatIec, convert, describeUnit } from "@theworker02/bytesize";

console.log(parseSize("1.5KiB"));
console.log(formatIec(1536));
console.log(convert("2MB", "MiB"));
console.log(describeUnit("GiB"));

CLI from source

git clone https://github.com/theworker02/bytesize.git
cd bytesize
node src/cli.js 1.5KiB