Skip to content

Instantly share code, notes, and snippets.

@tomoyamkung
Last active December 28, 2015 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomoyamkung/7559383 to your computer and use it in GitHub Desktop.
Save tomoyamkung/7559383 to your computer and use it in GitHub Desktop.
[JavaScript]文字列が Null かブランクであるかを問い合わせる。
/**
* 文字列が Null かブランクであるかを問い合わせる。
*
* @param {String} value 検査する文字列
* @returns {Boolean} 条件を満たしている場合 true
*/
function isNullOrEmpty(value) {
return typeof value === "undefined" || value.length === 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment