function keepNumeric
keepNumeric(text: string): string

Removes any non-numeric characters. This includes spaces.

Examples

Example 1

keepNumeric(null); // ""
keepNumeric('(555) 555-5555'); // 5555555555

Parameters

text: string

Return Type

string

Usage

import { keepNumeric } from ".";