UNPKG

yoastseo

Version:

Yoast client-side content analysis

24 lines (23 loc) 739 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; /** * Check the length of the description. * * @param {string} date The date. * @param {string} description The meta description. * * @returns {number} The length of the description. */ function _default(date, description) { let descriptionLength = description.length; /* If the meta description is preceded by a date, two spaces and a hyphen (" - ") are added as well. Therefore, three needs to be added to the total length. */ if (date !== "" && descriptionLength > 0) { descriptionLength += date.length + 3; } return descriptionLength; } //# sourceMappingURL=countMetaDescriptionLength.js.map