source: trip-planner-front/node_modules/@ngtools/webpack/src/ivy/paths.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.0 KB
Line 
1"use strict";
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10 if (k2 === undefined) k2 = k;
11 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
12}) : (function(o, m, k, k2) {
13 if (k2 === undefined) k2 = k;
14 o[k2] = m[k];
15}));
16var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17 Object.defineProperty(o, "default", { enumerable: true, value: v });
18}) : function(o, v) {
19 o["default"] = v;
20});
21var __importStar = (this && this.__importStar) || function (mod) {
22 if (mod && mod.__esModule) return mod;
23 var result = {};
24 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25 __setModuleDefault(result, mod);
26 return result;
27};
28Object.defineProperty(exports, "__esModule", { value: true });
29exports.externalizePath = exports.normalizePath = void 0;
30const nodePath = __importStar(require("path"));
31const normalizationCache = new Map();
32function normalizePath(path) {
33 let result = normalizationCache.get(path);
34 if (result === undefined) {
35 result = nodePath.win32.normalize(path).replace(/\\/g, nodePath.posix.sep);
36 normalizationCache.set(path, result);
37 }
38 return result;
39}
40exports.normalizePath = normalizePath;
41const externalizationCache = new Map();
42function externalizeForWindows(path) {
43 let result = externalizationCache.get(path);
44 if (result === undefined) {
45 result = nodePath.win32.normalize(path);
46 externalizationCache.set(path, result);
47 }
48 return result;
49}
50exports.externalizePath = (() => {
51 if (process.platform !== 'win32') {
52 return (path) => path;
53 }
54 return externalizeForWindows;
55})();
Note: See TracBrowser for help on using the repository browser.