How to use the getBindingIdentifiers function from @babel/types
Find comprehensive JavaScript @babel/types.getBindingIdentifiers code examples handpicked from public code repositorys.
65 66 67 68 69 70 71 72 73 74
if (!exports[name].description && prev?.description) { exports[name].description = prev.description; } } } else { let identifiers = t.getBindingIdentifiers(path.node.declaration); for (let [index, id] of Object.keys(identifiers).entries()) { exports[identifiers[id].name] = processExport(path.get('declaration.declarations')[index]); asset.symbols.set(identifiers[id].name, identifiers[id].name); }
+ 45 other calls in file
GitHub: harrysolovay/parcel
![harrysolovay profile picture](/harrysolovay.png?size=40)
33 34 35 36 37 38 39 40 41 42
} }, Declaration(node, asset, ancestors) { // If there is a global declaration of one of the variables, remove our declaration let identifiers = types.getBindingIdentifiers(node); for (let id in identifiers) { if (VARS.hasOwnProperty(id) && !inScope(ancestors)) { // Don't delete entirely, so we don't add it again when the declaration is referenced asset.globals.set(id, '');
+ 9 other calls in file
GitHub: codefrau/parcel-bundler
452 453 454 455 456 457 458 459 460 461
} else if (declaration) { path.replaceWith(declaration); let identifiers = t.isIdentifier(declaration.id) ? [declaration.id] : t.getBindingIdentifiers(declaration); for (let id in identifiers) { addExport(asset, path, identifiers[id], identifiers[id]); }
229 230 231 232 233 234 235 236 237 238 239 240 241
return path; } function getBindingIdentifiers(duplicates) { return t.getBindingIdentifiers(this.node, duplicates); } function getOuterBindingIdentifiers(duplicates) { return t.getOuterBindingIdentifiers(this.node, duplicates);
+ 23 other calls in file
@babel/types.identifier is the most popular function in @babel/types (20936 examples)