Skip to content

Commit

Permalink
0.17.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
sanex3339 committed Jul 31, 2018
1 parent 922fe82 commit 975b292
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class WebpackObfuscator {
*/
constructor (options: TObject, excludes: string|string[]) {
this.options = options || {};
this.excludes = typeof excludes === 'string' ? [excludes] : excludes || [];
this.excludes = this.prepareExcludes(excludes);
}

/**
Expand Down Expand Up @@ -102,6 +102,18 @@ class WebpackObfuscator {
});
}

private prepareExcludes(inputExcludes: string|string[]): string[] {
if (Array.isArray(inputExcludes)) {
return inputExcludes;
}

if (typeof inputExcludes === 'string') {
return [inputExcludes];
}

return [];
}

/**
* @param filePath
* @param excludes
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webpack-obfuscator",
"version": "0.17.2",
"version": "0.17.3",
"description": "javascript-obfuscator plugin for Webpack",
"keywords": [
"obfuscator",
Expand All @@ -14,7 +14,7 @@
],
"main": "index.js",
"dependencies": {
"javascript-obfuscator": "0.17.2",
"javascript-obfuscator": "0.17.3",
"multi-stage-sourcemap": "0.2.1",
"multimatch": "2.1.0"
},
Expand Down

0 comments on commit 975b292

Please sign in to comment.