![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
all-your-base
Advanced tools
Convert from one base to another
#####Supported bases
base/radix | name | module's abbr. |
---|---|---|
base 2 | binary | bin |
base 8 | octal | oct |
base 10 | decimal | dec |
base 16 | hexadecimal | hex |
##Installation
npm install all-your-base
##Usage
Use this in your own scripts and/or as a stand-alone command-line tool.
###From a script
decToBin(22);
hexToDec('10000');
#####Parameter data types
to convert from decimal, pass in a non-negative integer
to convert from any base except for decimal, pass in the value as a string
###As command line tool
#####Install as command line tool
npm link
from your local repo's root. The executable is named ayb
.
#####From command line
ayb decToBin 65536
ayb hexToDec FF001D
###List of all operations
Here's an exhaustive list for your reference.
From binary
binToDec
binToHex
binToOct
From octal
octToDec
octToBin
octToHex
From decimal
decToBin
decToHex
decToOct
From hexadecimal
hexToDec
hexToBin
hexToOct
The pattern: [old]To[New]
[old]
is the first three letters of the base you are converting from.
[New]
is the first three letters of the base to convert to.
Notice, the function name is lowerCamelCased.
###Helpful links
Learn more about different bases.
FAQs
convert from/to binary, octal, hexadecimal, decimal values
The npm package all-your-base receives a total of 17 weekly downloads. As such, all-your-base popularity was classified as not popular.
We found that all-your-base demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.