UNPKG

yoastseo

Version:

Yoast client-side content analysis

26 lines (24 loc) 728 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _stripSpaces = _interopRequireDefault(require("./stripSpaces.js")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** @module stringProcessing/stripNumbers */ /** * Removes all words comprised only of numbers. * * @param {string} text to remove words * @returns {string} The text with 'numberonly' words removed. */ function _default(text) { // Remove "words" comprised only of numbers text = text.replace(/\b[0-9]+\b/g, ""); text = (0, _stripSpaces.default)(text); if (text === ".") { text = ""; } return text; } //# sourceMappingURL=stripNumbers.js.map