* @param {Node} node * @param {number | ((comment: Comment) => boolean)} [flags] * @param {(comment: Comment) => boolean} [fn] * @returns {boolean}
(node, flags, fn)
| 59 | * @returns {boolean} |
| 60 | */ |
| 61 | function hasComment(node, flags, fn) { |
| 62 | if (!isNonEmptyArray(node?.comments)) { |
| 63 | return false; |
| 64 | } |
| 65 | const test = getCommentTestFunction(flags, fn); |
| 66 | return test ? node.comments.some(test) : true; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * @param {Node} node |
no test coverage detected
searching dependent graphs…