1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.umdModuleIdStrategy = void 0;
|
4 | const strings_1 = require("../utils/strings");
|
5 | const 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 '';
|
27 | };
|
28 | exports.umdModuleIdStrategy = umdModuleIdStrategy;
|
29 |
|
\ | No newline at end of file |