aboutsummaryrefslogtreecommitdiff
path: root/lib/propmangle.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-06-06 17:50:56 +0800
committerGitHub <noreply@github.com>2018-06-06 17:50:56 +0800
commit9e19e63551907be19c8c6b5b75217d7650504436 (patch)
tree9c545c0e02d16c73a19c96f44b191af4f1eaff0e /lib/propmangle.js
parentbce7ee5f6a28e87e2e68cd2d22b4e4280372d7bb (diff)
downloadtracifyjs-9e19e63551907be19c8c6b5b75217d7650504436.tar.gz
tracifyjs-9e19e63551907be19c8c6b5b75217d7650504436.zip
general clean-ups (#3175)
Diffstat (limited to 'lib/propmangle.js')
-rw-r--r--lib/propmangle.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/propmangle.js b/lib/propmangle.js
index 1bca1ad4..7ad4804d 100644
--- a/lib/propmangle.js
+++ b/lib/propmangle.js
@@ -56,7 +56,7 @@ function find_builtins(reserved) {
[ Object, Array, Function, Number,
String, Boolean, Error, Math,
Date, RegExp
- ].forEach(function(ctor){
+ ].forEach(function(ctor) {
Object.getOwnPropertyNames(ctor).map(add);
if (ctor.prototype) {
Object.getOwnPropertyNames(ctor.prototype).map(add);
@@ -136,7 +136,7 @@ function mangle_properties(ast, options) {
var unmangleable = [];
// step 1: find candidates to mangle
- ast.walk(new TreeWalker(function(node){
+ ast.walk(new TreeWalker(function(node) {
if (node instanceof AST_ObjectKeyVal) {
add(node.key);
}
@@ -157,7 +157,7 @@ function mangle_properties(ast, options) {
}));
// step 2: transform the tree, renaming properties
- return ast.transform(new TreeTransformer(function(node){
+ return ast.transform(new TreeTransformer(function(node) {
if (node instanceof AST_ObjectKeyVal) {
node.key = mangle(node.key);
}
@@ -234,7 +234,7 @@ function mangle_properties(ast, options) {
}
function mangleStrings(node) {
- return node.transform(new TreeTransformer(function(node){
+ return node.transform(new TreeTransformer(function(node) {
if (node instanceof AST_Sequence) {
var last = node.expressions.length - 1;
node.expressions[last] = mangleStrings(node.expressions[last]);