@ilihub/binary
v1.0.3
Published
Binary number system conversion typescript functions
Downloads
10
Maintainers
Readme
@ilihub/binary
Binary number system conversion typescript functions
Installation
# if you're using pnpm
pnpm add @ilihub/binary
# or, if you're using npm
npm install @ilihub/binary
# or, if you're using yarn
yarn add @ilihub/binary
Usage
import { Binary } from "@ilihub/binary";
const binary = new Binary("1000001");
const ascii = binary.toAscii();
console.log(ascii); // A
const decimal = binary.toDecimal();
console.log(decimal); // 65
const hexadecimal = binary.toHexadecimal();
console.log(hexadecimal); // 41
const octal = binary.toOctal();
console.log(octal); // 101
Sponsors & Backers
Support the development of new open-source projects from ilihub through crowdfunding.
The core of ilihub is our crowd-funded open-source projects, licensed under the permissive MIT license. Sponsorship increases the rate of bug fixes, documentation improvements, and feature development.