@toolsnap/binary
v1.0.0
Published
Binary, octal, decimal and hexadecimal conversion utilities
Maintainers
Readme
@toolsnap/binary
Lightweight number base conversion utilities — binary, octal, decimal, and hexadecimal.
🔗 Visit risetop.top for more developer tools.
Installation
npm install @toolsnap/binaryUsage
const { toBinary, toHex, toOctal, fromHex, padBinary } = require('@toolsnap/binary');
toBinary(255); // '11111111'
toOctal(255); // '377'
toHex(255); // 'FF'
toHex(255, true); // '0xFF'
fromHex('FF'); // 255
padBinary(5, 8); // '00000101'
convert('1010', 2, 10); // '10'License
MIT
