UNPKG

yoastseo

Version:

Yoast client-side content analysis

31 lines (29 loc) 962 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _countCharacters = _interopRequireDefault(require("../helpers/countCharacters")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * A result of the character count calculation. * * @typedef CharacterCountResult * @param {number} count The number of characters found in the text. * @param {string} unit The unit used in the text length calculations, always "character". */ /** * Count the characters in the text. * * @param {Paper} paper The Paper object. * * @returns {CharacterCountResult} The number of characters found in the text, plus "character" as the unit used in calculating the text length. */ function _default(paper) { return { text: paper.getText(), count: (0, _countCharacters.default)(paper.getText()), unit: "character" }; } //# sourceMappingURL=textLength.js.map