radix10toradix64
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Radix 10 to radix 64

Converts radix-10 numbers to their radix-64 numerical equivalent and back. Inspired by this Stack Overflow question.

This module is originally written in Typescript using TSDX.

Usage

ES Modules environment:

import Radix10ToRadix64 from 'radix10toradix64';
 
const converter = new Radix10ToRadix64();
// To radix 64
converter.toRadix64(4096); // '100'
converter.toRadix64(62831853071); // 'wX4VuF'
// From radix 64
converter.toRadix10('4096'); // 1049158
converter.toRadix10('628318530'); // 1698198949220544

CommonJS:

const Radix10ToRadix64 = require('radix10toradix64').default;
const converter = new Radix10ToRadix64();
// To radix 64
converter.toRadix64(4096); // '100'
converter.toRadix64(62831853071); // 'wX4VuF'
// From radix 64
converter.toRadix10('4096'); // 1049158
converter.toRadix10('628318530'); // 1698198949220544

Contributing

The initial goal of this module is to provide basic radix 10 to radix 64 conversion for a side project of mine. Whilst I have no intentions of making this a complex library and add lots of functionality myself, you're welcome to submit PRs with new features.

If you found a bug, please open an issue and I'll do my best to get it sorted asap. If you can submit a PR with the bugfix that is even better!

License

MIT, see LICENSE.md.

Copyright (c) 2018 Leonardo Melo.

/radix10toradix64/

    Package Sidebar

    Install

    npm i radix10toradix64

    Weekly Downloads

    1

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    25.3 kB

    Total Files

    12

    Last publish

    Collaborators

    • leomeloxp