Installation
npm install --save @types/power-radix
Summary
This package contains type definitions for power-radix (https://github.com/cflynn07/power-radix).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/power-radix.
index.d.ts
/**
* Convert number from source radix to target radix
* with optional custom character encoding
* http://www.deimel.org/comp_sci/conversion.htm
*/
declare class PowerRadix {
/**
* Creates a new instance of PowerRadix
*/
constructor(digits: string | number | number[], sourceRadix: number | number[]);
/**
* Convert to target radix, return as Array
* @param targetRadix - target radix / encoding characters
* @return source digits converted to target radix presented in format of Array
*/
toArray(targetRadix: number | string[]): string[];
/**
* Convert to target radix, return as String
*
* @param targetRadix - target radix / encoding characters
* @return - source digits converted to target radix presented in format of Array
*/
toString(targetRadix: number | string[]): string;
}
export = PowerRadix;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: none
Credits
These definitions were written by Piotr Błażejewicz.