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; } } }); }
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); }
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; } } } });
+ 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
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 = {};
+ 3 other calls in file
22 23 24 25 26 27 28
}); } module.exports = { traverse, VisitorOption: estraverse.VisitorOption };
+ 3 other calls in file
estraverse.traverse is the most popular function in estraverse (171 examples)