UNPKG

@technobuddha/library

Version:
16 lines (15 loc) 433 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extractDigits = void 0; var constants_1 = require("../constants"); /** * Remove all non-digit characters from a string * * @param input The string * @returns digits from the string */ function extractDigits(input) { return input.replace(/\D/ug, constants_1.empty); } exports.extractDigits = extractDigits; exports.default = extractDigits;