source: trip-planner-front/node_modules/license-webpack-plugin/dist/ChunkIncludeExcludeTester.js@ 6fe77af

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

initial commit

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[6a3a178]1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.ChunkIncludeExcludeTester = void 0;
4var ChunkIncludeExcludeTester = /** @class */ (function () {
5 function ChunkIncludeExcludeTester(includeExcludeTest) {
6 this.includeExcludeTest = includeExcludeTest;
7 }
8 ChunkIncludeExcludeTester.prototype.isIncluded = function (chunkName) {
9 if (typeof this.includeExcludeTest === 'function') {
10 return this.includeExcludeTest(chunkName);
11 }
12 // only include
13 if (this.includeExcludeTest.include && !this.includeExcludeTest.exclude) {
14 return this.includeExcludeTest.include.indexOf(chunkName) > -1;
15 }
16 // only exclude
17 if (this.includeExcludeTest.exclude && !this.includeExcludeTest.include) {
18 // included as long as it's not excluded
19 return !(this.includeExcludeTest.exclude.indexOf(chunkName) > -1);
20 }
21 // include and exclude together
22 if (this.includeExcludeTest.include && this.includeExcludeTest.exclude) {
23 return (!(this.includeExcludeTest.exclude.indexOf(chunkName) > -1) &&
24 this.includeExcludeTest.include.indexOf(chunkName) > -1);
25 }
26 return true;
27 };
28 return ChunkIncludeExcludeTester;
29}());
30exports.ChunkIncludeExcludeTester = ChunkIncludeExcludeTester;
Note: See TracBrowser for help on using the repository browser.