UNPKG

yoastseo

Version:

Yoast client-side content analysis

24 lines (23 loc) 788 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _yoastseo = require("yoastseo"); var _passiveVoiceEndings = _interopRequireDefault(require("../../config/internal/passiveVoiceEndings")); 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 find participles in. * * @returns {Array} The list with participles found. */ function _default(clauseText) { const words = getWords(clauseText); return words.filter(word => _passiveVoiceEndings.default.some(ending => word.endsWith(ending))); } //# sourceMappingURL=getParticiples.js.map