1.0.0 • Published 1 year ago

cleaner-conv v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Number Conversion

This is a module to convert numbers between binary and decimal formats.

Installation

npm install cleaner-conv

Usage

const { binaryToDecimal, decimalToBinary } = require('number-conversion');

console.log(binaryToDecimal('1010')); // 10
console.log(decimalToBinary(10));     // 1010

Functions

binaryToDecimal(binary): Converts a binary string to a decimal number. decimalToBinary(decimal): Converts a decimal number to a binary string.

License

MIT

1.0.0

1 year ago