From ccca0ca8f28708bd5facf0a847ea757d99f4dab0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 28 May 2014 08:40:41 -0400 Subject: [PATCH] refactor(util) getType --- lib/util.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/util.js b/lib/util.js index f79c5961..62e28053 100644 --- a/lib/util.js +++ b/lib/util.js @@ -619,9 +619,7 @@ */ this.getType = function(variable) { var regExp = new RegExp('\\s([a-zA-Z]+)'), - obj = {}, - toStr = obj.toString, - str = toStr.call(variable), + str = {}.toString.call(variable), typeBig = str.match(regExp)[1], type = typeBig.toLowerCase();