Convert between numerical bases.
npm install basea
const basea = require("basea");
basea(20, 16); // Convert 20 to base 16
//=> '14'
basea("14", 16, 10); // Convert 20 to base 10 from base 16
//=> '20'
basea(10, "abc"); // Convert 10 to use a custom base
//=> 'bab'
Type: number or string
The number to convert.
Type: number or string
The base to convert from.
Type: number or string
The base to convert to.
Type: object
Numerical bases to use for conversion. Can be modified to affect the output of basea, such as basea.bases[999] = "abc"
.