UNPKG

yoastseo

Version:

Yoast client-side content analysis

23 lines (21 loc) 813 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _getAnchorsFromText = _interopRequireDefault(require("../helpers/link/getAnchorsFromText.js")); var _lodash = require("lodash"); var _url = _interopRequireDefault(require("../helpers/url/url.js")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** @module analyses/getLinkStatistics */ /** * Checks a text for anchors and returns the number found. * * @param {Object} paper The paper to get the text from. * @returns {Array} An array with the anchors */ function _default(paper) { const anchors = (0, _getAnchorsFromText.default)(paper.getText()); return (0, _lodash.map)(anchors, _url.default.getFromAnchorTag); } //# sourceMappingURL=getLinks.js.map