change-number-base
Converts a number from one base to another.
Node Repository
https://www.npmjs.com/package/@pelevesque/change-number-base
Installation
npm install @pelevesque/change-number-base
Tests
Command | Description |
---|---|
npm test or npm run test
|
All Tests Below |
npm run cover |
Standard Style |
npm run standard |
Coverage |
npm run unit |
Unit Tests |
Usage
const changeNumberBase = require('@pelevesque/change-number-base')
const num = 102
const initialBase = 3
const newBase = 10
const result = changeNumberBase(num, initialBase, newBase)
// result === 11