MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / compare

Function compare

packages/ast/find/index.js:4–9  ·  view source on GitHub ↗
(type, selector)

Source from the content-addressed store, hash-verified

2const unique = require('lodash.uniq');
3
4function compare(type, selector) {
5 if (Array.isArray(selector)) {
6 return selector.includes(type);
7 }
8 return type === selector;
9}
10
11function findByType(tree, selector) {
12 const nodes = [];

Callers 1

findByTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected