From 79d5b6d554703c02a0bb266db6bfe980f9adf71d Mon Sep 17 00:00:00 2001 From: Michel Tu Date: Sun, 6 Jul 2014 14:51:05 -0700 Subject: [PATCH] Replace 'for in' with 'Object.keys' --- lib/helper.js | 5 +++-- lib/term.js | 12 ++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/helper.js b/lib/helper.js index ff9d50b..48dc6f2 100644 --- a/lib/helper.js +++ b/lib/helper.js @@ -37,8 +37,9 @@ function hasImplicit(arg) { module.exports.hasImplicit = hasImplicit; function loopKeys(obj, fn) { - for(var key in obj) { - fn(obj, key); + var keys = Object.keys(obj); + for(var i=0; i