Socket
Socket
Sign inDemoInstall

any-to-any

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

any-to-any

convert numbers between bases ( any base to any base ) 🔀 ..


Version published
Weekly downloads
297
decreased by-36.54%
Maintainers
1
Weekly downloads
 
Created
Source

ANY-TO-ANY - converts numbers between bases ; binary , decimal , octal , hexadecimal and muche more ..


imed-jaberi Build Status

Coverage Status

The purpose of this module is to convert numbers from any base to other base you want ..
NOTE: you can send to me for add anything you want in instgram ..

Installation


  • NPM :
$ npm install any-to-any
  • YARN :
$ yarn add any-to-any

Usage


The method of use is simple and very easy ... Just follow these steps :

Step 1 : Import the module in this way.

const { Convert } = require ('any-to-any') ;

Step 2 : Enter the input number , the input base and the output base you want to the function.

let InputNumber  = "1110111"; // 119 in decimal
let InputBase = 2 ;
let OutputBase = 8 ;
let result = Convert ( InputNumber , InputBase , OutputBase  );
console.log(`*****\n ${result} \n*****`);

Step 3 : Execute method to see the result ..

$your_pc_name_with_your_directory
*****
 167
*****
NOTE: in case the input number is consists of numbers only , you can enter the number to the function in number type .. so the step 2 will be :
let InputNumber  = 1110111; // 119 in decimal
let InputBase = 2 ;
let OutputBase = 8 ;
let result = Convert ( InputNumber , InputBase , OutputBase  ); 
console.log(`*****\n ${result} \n*****`);

Examples


There are a set of suggested examples that have been tested that you can follow here.

Some Informations :


Switching between bases numbers is becoming easier with this module .. This module can convert the integers numbers between base 2 & base 36 and soon it will be possible to convert real numbers ...

What new in the future ?

Develop the module more on the conversion in the large bases ...

License

MIT

Keywords

FAQs

Package last updated on 13 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc