Created
July 3, 2014 09:53
-
-
Save hehongwei44/1be8311320eb6f707394 to your computer and use it in GitHub Desktop.
判断输入的参数是否为空
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @Dependence : https://gist.github.com/hehongwei44/3e167cfcda47d4c8051a#file-extendstringprototype-js | |
* @description : 判断输入的参数是否为空 | |
* @return : true表示为输入参数为空 | |
* | |
*/ | |
var isEmpty = function (str) { | |
//空引用 空字符串 空输入 | |
return str == null || typeof str == "undefined" || str.trim() == "" ? true : false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment