yoastseo
Version:
Yoast client-side content analysis
31 lines (30 loc) • 925 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _yoastseo = require("yoastseo");
var _participles = _interopRequireDefault(require("../../config/internal/participles.js"));
var _lodash = require("lodash");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const {
getWords
} = _yoastseo.languageProcessing;
/**
* Creates an array of participles found in a clause.
*
* @param {string} clauseText The clause to finds participles in.
*
* @returns {Array} The array with the participles.
*/
function _default(clauseText) {
const words = getWords(clauseText);
const foundParticiples = [];
(0, _lodash.forEach)(words, function (word) {
if ((0, _lodash.includes)(_participles.default, word)) {
foundParticiples.push(word);
}
});
return foundParticiples;
}
//# sourceMappingURL=getParticiples.js.map