UNPKG

yoastseo

Version:

Yoast client-side content analysis

22 lines (21 loc) 782 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = isPassiveSentence; var _yoastseo = require("yoastseo"); var _participlesShortenedList = _interopRequireDefault(require("../config/internal/participlesShortenedList.js")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } const { areWordsInSentence } = _yoastseo.languageProcessing; /** * Checks the passed sentence to see if it contains passive verbs. * * @param {string} sentence The sentence to match against. * @returns {Boolean} Whether the sentence contains passive voice. */ function isPassiveSentence(sentence) { return areWordsInSentence(_participlesShortenedList.default, sentence); } //# sourceMappingURL=isPassiveSentence.js.map