base_convert
v1.1.2
Published
Convert a decimal to a given base and back to it's decimal representation.
Downloads
51
Readme
base_convert
Convert a decimal to a given base and back to it's decimal representation.
Installation
npm install base_convert
Usage
const convert = require('base_convert')
// Convert a decimal to a given base.
console.log(convert.d2b(10, 2)) // 1010
// Convert a number from a given base to its decimal representation.
console.log(convert.b2d(1010, 2)) // 10