/** * This function will help handle response with generic pattern by using * success validations function map to determine different case of valid response * * @param {string} price: * Formatted string with currency tag * * @param {number} base: * Radix value if you want convert special string number format like hex * * @return {number} * Return value will be parsed integer with base of 10 by default * * @example * const num = toNumber('Rp 12.000'); // num = 12000 */ export default function toNumber(price: string, base?: number): number;