How to use the isReferenced function from babel-types
Find comprehensive JavaScript babel-types.isReferenced code examples handpicked from public code repositorys.
GitHub: mattdesl/parcel

32 33 34 35 36 37 38 39 40 41
Identifier(node, asset, ancestors) { let parent = ancestors[ancestors.length - 2]; if ( VARS.hasOwnProperty(node.name) && !asset.globals.has(node.name) && types.isReferenced(node, parent) ) { asset.globals.set(node.name, VARS[node.name](asset)); } },
+ 13 other calls in file
GitHub: lifeart/parcel

29 30 31 32 33 34 35 36 37
} }, Identifier(node, asset, ancestors) { let parent = ancestors[ancestors.length - 2]; if (VARS.hasOwnProperty(node.name) && !asset.globals.has(node.name) && types.isReferenced(node, parent)) { asset.globals.set(node.name, VARS[node.name](asset)); } },
+ 9 other calls in file
babel-types.identifier is the most popular function in babel-types (4076 examples)