An arbitrary length unsigned integer formatter library for Node.js (v1.0.2, last updated 2016). It converts Buffer, byte arrays, or hex strings to decimal, binary, hex, or octal strings without precision loss, unlike JavaScript's native Number.toString(). Features include endianness control, grouping, padding, and prefix options. Only maintained, not actively developed.
npm install biguint-formatNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates converting byte arrays, hex strings, and Buffers to decimal, binary, and hex with options like grouping, prefix, and endianness.
Ensure input is one of the supported types: Buffer, Array<0-255>, or hex string.
Pass options.format: 'LE' when input bytes are in little-endian order.
Do not use prefix with dec; use hex or bin if prefix is needed.
Consider offloading to Worker threads or using async alternatives for very large inputs.
Only use trim with format: 'bin'.
Convert the number to a hex string, Buffer, or byte array. For example: format(0x1FF.toString(16), 'dec')
Ensure each byte is an integer between 0 and 255 inclusive.
Use 'const format = require('biguint-format')' (CJS) or 'import format from 'biguint-format'' (ESM).Convert input to Buffer using Buffer.from() or pass as byte array.
No dependency data recorded yet.