hd-utils
Version:
A handy utils for modern JS developers
8 lines (7 loc) • 363 B
TypeScript
/**
* It takes a string, removes all non-numeric characters, and returns the result
* @param {string} number - string - The string to be parsed.
* @example parseNumber("123 ") => 123
* @returns A function that takes a string and returns a string with all non-digit characters removed.
*/
export default function parseNumber(number: string | number): number;