1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 28 451 1206 1978 143 1063 28 | /** * Decide whether a comment should go through the AST inference * stage based on whether it has an explicit `@name` tag. * * @param {Function} fn parser * @returns {boolean} true if the comment should skip inference */ function shouldSkipInference(fn) { return function (comment) { if (comment.tags.some(function (tag) { return tag.title === 'name'; })) { return comment; } return fn(comment); }; } module.exports = shouldSkipInference; |