UNPKG

926 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.umdModuleIdStrategy = void 0;
4const strings_1 = require("../utils/strings");
5const umdModuleIdStrategy = (moduleId, umdModuleIds = {}) => {
6 let nameProvided;
7 if ((nameProvided = umdModuleIds[moduleId])) {
8 return nameProvided;
9 }
10 let regMatch;
11 if ((regMatch = /^\@angular\/(.+)/.exec(moduleId))) {
12 return `ng.${regMatch[1]
13 .split('/')
14 .map(strings_1.camelize)
15 .join('.')}`;
16 }
17 if (moduleId === 'rxjs') {
18 return 'rxjs';
19 }
20 if ((regMatch = /^rxjs\/(\/?.*)/.exec(moduleId))) {
21 return `rxjs.${regMatch[1]}`;
22 }
23 if (moduleId === 'tslib') {
24 return 'tslib';
25 }
26 return ''; // leave it up to rollup to guess the global name
27};
28exports.umdModuleIdStrategy = umdModuleIdStrategy;
29//# sourceMappingURL=umd-module-id-strategy.js.map
\No newline at end of file