How to use the VisitorOption function from estraverse
Find comprehensive JavaScript estraverse.VisitorOption code examples handpicked from public code repositorys.
25 26 27 28 29 30 31 32 33 34
parentCollection = [parentCollection]; } } if (cb(node, parent, parentCollection) === false) { return estraverse.VisitorOption.Skip; } } }); }
549
0
2
GitHub: saltlab/sahand
98 99 100 101 102 103 104 105 106 107
// TODO TODO TODO TODO TODO TODO if (node.type == 'FunctionDeclaration') { // TODO TODO TODO TODO TODO TODO if (node.id.name == '_functionEnter' || node.id.name == '_functionExit' || node.id.name == '_functionEnter_callback') return estraverse.VisitorOption.Skip; //////////////// TODO TODO TODO ????????????? name = node.id.name; // console.log('***** DEC: ', name); }
2
8
17
GitHub: nishants/stgo-vscode
8 9 10 11 12 13 14 15 16 17
estraverse.traverse(AST, { enter: function (node, parent) { if (node.type == 'Literal') { if (node.value === fileName) { charPos = node.start; return estraverse.VisitorOption.Break; } } } });
3
2
8
+ 5 other calls in file
GitHub: jscad/OpenJSCAD.org
10 11 12 13 14 15 16 17 18 19
estraverse.traverse(ast, { enter: function (node, parent) { if (predicate(node)) { results.push(dataExtractor(node)) return estraverse.VisitorOption.Skip } } }) return results
483
0
123
GitHub: shz/a-kind-of-magic
19 20 21 22 23 24 25 26 27 28
, typeofHelper = require('./typeof') , hoistinator = require('./hoistinator') ; // Ease of use... var SKIP = estraverse.VisitorOption.Skip; var BREAK = estraverse.VisitorOption.Break; // If behavior is required on a node, it goes here var nodeHandlers = {};
1
0
2
+ 3 other calls in file
22 23 24 25 26 27 28
}); } module.exports = { traverse, VisitorOption: estraverse.VisitorOption };
0
21
3
+ 3 other calls in file
estraverse.traverse is the most popular function in estraverse (171 examples)