flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
19
BACK_BACK/node_modules/parcel-bundler/lib/scope-hoisting/utils.js
generated
vendored
Executable file
19
BACK_BACK/node_modules/parcel-bundler/lib/scope-hoisting/utils.js
generated
vendored
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
|
||||
const t = require('@babel/types');
|
||||
|
||||
function getName(asset, type, ...rest) {
|
||||
return '$' + t.toIdentifier(asset.id) + '$' + type + (rest.length ? '$' + rest.map(name => name === 'default' ? name : t.toIdentifier(name)).join('$') : '');
|
||||
}
|
||||
|
||||
function getIdentifier(asset, type, ...rest) {
|
||||
return t.identifier(getName(asset, type, ...rest));
|
||||
}
|
||||
|
||||
function getExportIdentifier(asset, name) {
|
||||
return getIdentifier(asset, 'export', name);
|
||||
}
|
||||
|
||||
exports.getName = getName;
|
||||
exports.getIdentifier = getIdentifier;
|
||||
exports.getExportIdentifier = getExportIdentifier;
|
||||
Loading…
Add table
Add a link
Reference in a new issue