🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

base-conv

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-conv

Convert arbitrarily large numbers from any radix representation to any other

3.0.0
latest
Source
npm
Version published
Weekly downloads
27
575%
Maintainers
1
Weekly downloads
 
Created
Source

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...'

Keywords

number

FAQs

Package last updated on 07 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts