From 4902adbe8f327623c56976dbe7d67ea942720ba4 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 21 May 2014 03:42:24 -0400 Subject: [PATCH] refactor(util) parseJSON, stringifyJSON --- lib/util.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/util.js b/lib/util.js index 01e3146e..8b9abaea 100644 --- a/lib/util.js +++ b/lib/util.js @@ -237,27 +237,27 @@ /** * @param pJSON */ - this.parseJSON = function(pJSON) { - var ret; + this.parseJSON = function(str) { + var obj; Util.tryCatch(function() { - ret = JSON.parse(pJSON); + obj = JSON.parse(str); }); - return ret; + return obj; }; /** * @param pObj */ - this.stringifyJSON = function(pObj) { - var ret; + this.stringifyJSON = function(obj) { + var str; Util.tryCatchLog(function() { - ret = JSON.stringify(pObj, null, 4); + str = JSON.stringify(obj, null, 4); }); - return ret; + return str; }; /**