File tree Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " javascript-obfuscator" ,
3
- "version" : " 0.11.0-beta.2 " ,
3
+ "version" : " 0.11.0" ,
4
4
"description" : " JavaScript obfuscator" ,
5
5
"keywords" : [
6
6
" obfuscator" ,
Original file line number Diff line number Diff line change @@ -135,12 +135,8 @@ export class Obfuscator implements IObfuscator {
135
135
private static isBlackListNode ( node : ESTree . Node ) : boolean {
136
136
const guardsLength : number = Obfuscator . blackListGuards . length ;
137
137
138
- let guard : TNodeGuard ;
139
-
140
138
for ( let i : number = 0 ; i < guardsLength ; i ++ ) {
141
- guard = Obfuscator . blackListGuards [ i ] ;
142
-
143
- if ( guard ( node ) ) {
139
+ if ( Obfuscator . blackListGuards [ i ] ( node ) ) {
144
140
return true ;
145
141
}
146
142
}
@@ -245,23 +241,19 @@ export class Obfuscator implements IObfuscator {
245
241
* @returns {TVisitorFunction }
246
242
*/
247
243
private mergeVisitorsForDirection ( visitors : IVisitor [ ] , direction : TVisitorDirection ) : TVisitorFunction {
248
- if ( ! visitors . length ) {
249
- return ( node : ESTree . Node , parentNode : ESTree . Node ) => node ;
250
- }
251
-
252
244
const visitorsLength : number = visitors . length ;
253
245
254
- let visitor : IVisitor ;
246
+ if ( ! visitorsLength ) {
247
+ return ( node : ESTree . Node , parentNode : ESTree . Node ) => node ;
248
+ }
255
249
256
250
return ( node : ESTree . Node , parentNode : ESTree . Node ) => {
257
251
if ( Obfuscator . isBlackListNode ( node ) ) {
258
252
return estraverse . VisitorOption . Skip ;
259
253
}
260
254
261
255
for ( let i : number = 0 ; i < visitorsLength ; i ++ ) {
262
- visitor = visitors [ i ] ;
263
-
264
- const visitorFunction : TVisitorFunction | undefined = visitor [ direction ] ;
256
+ const visitorFunction : TVisitorFunction | undefined = visitors [ i ] [ direction ] ;
265
257
266
258
if ( ! visitorFunction ) {
267
259
continue ;
You can’t perform that action at this time.
0 commit comments