UNPKG

yoastseo

Version:

Yoast client-side content analysis

24 lines (22 loc) 644 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _yoastseo = require("yoastseo"); const { getWords } = _yoastseo.languageProcessing; /** * Creates an array of participles found in a clause. * * @param {string} clauseText The clause to find participles in. * * @returns {Array} The list with participles found. */ function _default(clauseText) { const words = getWords(clauseText); const participleEndingsRegex = new RegExp("(ný|ní|tý|ná|tá|né|té)$"); return words.filter(word => participleEndingsRegex.test(word)); } //# sourceMappingURL=getParticiples.js.map