Quantumbraid's picture
download
raw
750 Bytes
import { addDefault, addNamed } from '@babel/helper-module-imports'
export function addImport(
state,
importSource /*: string */,
importedSpecifier /*: string */,
nameHint /* ?: string */
) {
let cacheKey = ['import', importSource, importedSpecifier].join(':')
if (state[cacheKey] === undefined) {
let importIdentifier
if (importedSpecifier === 'default') {
importIdentifier = addDefault(state.file.path, importSource, { nameHint })
} else {
importIdentifier = addNamed(
state.file.path,
importedSpecifier,
importSource,
{
nameHint
}
)
}
state[cacheKey] = importIdentifier.name
}
return {
type: 'Identifier',
name: state[cacheKey]
}
}

Xet Storage Details

Size:
750 Bytes
·
Xet hash:
fa9fab27a0b7fb1585b52f6b2d76ced6a653b2350dde2202962829789f1c10d9

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.