From 15614cb95319a153c5435c45a873cf684d329e2d Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 18 Sep 2014 08:32:37 -0400 Subject: [PATCH] refactor(util) getStrBigFirst: pStr -> str --- lib/util.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/util.js b/lib/util.js index c591cb59..d10343ba 100644 --- a/lib/util.js +++ b/lib/util.js @@ -289,14 +289,12 @@ }; - this.getStrBigFirst = function(pStr) { - var ret; + this.getStrBigFirst = function(str) { + var isStr = Util.isString(str), + ret = str; - if (Util.isString(pStr) && pStr.length > 0) - ret = pStr[0].toUpperCase() + - pStr.substring(1); - else - ret = pStr; + if (isStr && str.length) + ret = str[0].toUpperCase() + str.substring(1); return ret; };