@finsweet/ts-utils
Version:
Typescript utils for custom Webflow projects.
9 lines (8 loc) • 337 B
TypeScript
/**
* Converts a string to a number, removing any invalid symbols like `$` or `,`.
* If the function is not able to extract a valid number from the string, it will return `null`.
*
* @param value A string number.
* @returns The valid number value.
*/
export declare const extractNumberFromString: (value: string) => number | null;