Sha256: 5fda0cc795c51dc64d34ea3c677ebaf5bf5cdc2b764b8f64505b9d9a2ca684d4
Contents?: true
Size: 304 Bytes
Versions: 13
Compression:
Stored size: 304 Bytes
Contents
function hasAncestor(path, types) { let parent = 0; let parentNode = path.getParentNode(); while (parentNode) { if (types.includes(parentNode.type)) { return true; } parent += 1; parentNode = path.getParentNode(parent); } return false; } module.exports = hasAncestor;
Version data entries
13 entries across 13 versions & 1 rubygems