How to use the isDeclaration function from @babel/types
Find comprehensive JavaScript @babel/types.isDeclaration code examples handpicked from public code repositorys.
316 317 318 319 320 321 322 323 324 325
let newName; if (path.node.name.startsWith('VAR_')) { newName = path.node.name; } else if (babelTypes.isFunctionDeclaration(binding.path.node) || babelTypes.isFunctionExpression(binding.path.node) || babelTypes.isDeclaration(binding.path.node) || babelTypes.isFunctionExpression(binding.path.node)) { // Unknown dependency. Don't handle this. _markSkipped(path); return;
42
19
0
@babel/types.identifier is the most popular function in @babel/types (20936 examples)