Skip to content

Instantly share code, notes, and snippets.

@hehongwei44
Created July 3, 2014 09:53
Show Gist options
  • Save hehongwei44/1be8311320eb6f707394 to your computer and use it in GitHub Desktop.
Save hehongwei44/1be8311320eb6f707394 to your computer and use it in GitHub Desktop.
判断输入的参数是否为空
/**
*
* @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