Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
$visitChildren(node, options, visitorKeys) {
const { type } = node
for (const key of visitorKeys[type] || evk.getKeys(node)) {
const value = node[key]
if (Array.isArray(value)) {
for (const element of value) {
if (
element &&
this.$visit(element, options, visitorKeys)
) {
return true
}
}
} else if (value && this.$visit(value, options, visitorKeys)) {
return true
}
}
static getKeys(node) {
return vk.getKeys(node);
}
function getVisitorKeys(visitorKeys, node) {
let keys = visitorKeys[node.type];
if (!keys) {
keys = vk.getKeys(node);
debug("Unknown node type \"%s\": Estimated visitor keys %j", node.type, keys);
}
return keys;
}
function getVisitorKeys(visitorKeys, node) {
let keys = visitorKeys[node.type];
if (!keys) {
keys = vk.getKeys(node);
debug("Unknown node type \"%s\": Estimated visitor keys %j", node.type, keys);
}
return keys;
}
function getVisitorKeys(visitorKeys, node) {
let keys = visitorKeys[node.type];
if (!keys) {
keys = vk.getKeys(node);
debug("Unknown node type \"%s\": Estimated visitor keys %j", node.type, keys);
}
return keys;
}
function getVisitorKeys(visitorKeys, node) {
let keys = visitorKeys[node.type];
if (!keys) {
keys = vk.getKeys(node);
debug("Unknown node type \"%s\": Estimated visitor keys %j", node.type, keys);
}
return keys;
}
static getKeys(node) {
return vk.getKeys(node);
}
static getKeys(node) {
return vk.getKeys(node);
}
static getKeys(node) {
return vk.getKeys(node);
}