ANY-TO-ANY - converts numbers between bases ; binary , decimal , octal , hexadecimal and muche more ..
The purpose of this module is to convert numbers from any base to other base you want ..
This module can convert only the integers numbers between base 2 & base 36. Soon, it will be possible to convert real numbers [wip]
# npm ..$ npm install any-to-any# yarn ..$ yarn add any-to-any
This is a practical example of how to use.
// const Convert = require('any-to-any')const Convert =const InputNumber = '1110111' // 119 in decimalconst InputBase = 2const OutputBase = 8const result =console// 167// NOTE: in case the input number is consists of numbers only,// you can enter the number to the function in number type ..const InputNumber = 1110111 // 119 in decimalconst InputBase = 2const OutputBase = 8const result = ;console;// 167
NOTE: There are a set of suggested examples that have been tested that you can follow here.