use [].indexOf() instead of switch
This commit is contained in:
parent
21f4a6aea1
commit
4116731b5a
12
bin/uglifyjs
12
bin/uglifyjs
|
|
@ -375,15 +375,7 @@ function to_cache(key) {
|
|||
return cache[key];
|
||||
}
|
||||
|
||||
var skip_keys = [ "cname", "enclosed", "parent_scope", "scope", "thedef", "uses_eval", "uses_with" ];
|
||||
function skip_key(key) {
|
||||
switch (key) {
|
||||
case "cname":
|
||||
case "enclosed":
|
||||
case "parent_scope":
|
||||
case "scope":
|
||||
case "thedef":
|
||||
case "uses_eval":
|
||||
case "uses_with":
|
||||
return true;
|
||||
}
|
||||
return skip_keys.indexOf(key) >= 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user