Skip to content

Commit 975b292

Browse files
committed
0.17.3 release
1 parent 922fe82 commit 975b292

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

index.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class WebpackObfuscator {
2727
*/
2828
constructor (options: TObject, excludes: string|string[]) {
2929
this.options = options || {};
30-
this.excludes = typeof excludes === 'string' ? [excludes] : excludes || [];
30+
this.excludes = this.prepareExcludes(excludes);
3131
}
3232

3333
/**
@@ -102,6 +102,18 @@ class WebpackObfuscator {
102102
});
103103
}
104104

105+
private prepareExcludes(inputExcludes: string|string[]): string[] {
106+
if (Array.isArray(inputExcludes)) {
107+
return inputExcludes;
108+
}
109+
110+
if (typeof inputExcludes === 'string') {
111+
return [inputExcludes];
112+
}
113+
114+
return [];
115+
}
116+
105117
/**
106118
* @param filePath
107119
* @param excludes

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webpack-obfuscator",
3-
"version": "0.17.2",
3+
"version": "0.17.3",
44
"description": "javascript-obfuscator plugin for Webpack",
55
"keywords": [
66
"obfuscator",
@@ -14,7 +14,7 @@
1414
],
1515
"main": "index.js",
1616
"dependencies": {
17-
"javascript-obfuscator": "0.17.2",
17+
"javascript-obfuscator": "0.17.3",
1818
"multi-stage-sourcemap": "0.2.1",
1919
"multimatch": "2.1.0"
2020
},

0 commit comments

Comments
 (0)