Created
July 23, 2014 07:49
-
-
Save CooLNuanfeng/5e20d9bc9bbf479d7fde to your computer and use it in GitHub Desktop.
判断是否为空
This file contains hidden or 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表示为输入参数为空 | |
* | |
*/ | |
function isEmpty (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