stringUtil.js 284 B

123456789101112
  1. module.exports = {
  2. isEmptyString: function(str) {
  3. var rst = false;
  4. if (str == null || str == undefined) {
  5. rst = true;
  6. } else if (typeof str) {
  7. var reg = /^\s*$/;
  8. rst = reg.test(str);
  9. }
  10. return rst;
  11. }
  12. }