UNPKG

400 BTypeScriptView Raw
1/**
2 * @name hexToNumber
3 * @summary Creates a Number value from a Buffer object.
4 * @description
5 * `null` inputs returns an NaN result, `hex` values return the actual value as a `Number`.
6 * @example
7 * <BR>
8 *
9 * ```javascript
10 * import { hexToNumber } from '@polkadot/util';
11 *
12 * hexToNumber('0x1234'); // => 0x1234
13 * ```
14 */
15export declare function hexToNumber(value?: string | null): number;