base-conv

3.0.0 • Public • Published

radix conversion

npm version build status coverage status

  • default alphabet is '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_' for input and output
  • you can change it by passing different alphabets to the BaseConv exported function
  • no IEEE-754 limitation

usage:

const conv = require('base-conv').default;
conv(42, 10, 16) // '2a'
conv('42', 10, 16) // '2a'
conv('42'.repeat(100), 10, 16) // '8de2991df40ff783057818d0012f3bc1c...'

Package Sidebar

Install

npm i base-conv

Weekly Downloads

0

Version

3.0.0

License

ISC

Unpacked Size

4.82 kB

Total Files

4

Last publish

Collaborators

  • caub