isNotEmpty1 자바스크립트 빈값체크, isEmpty, isNotEmpty, null체크 자바스크립트 빈값체크, isEmpty, isNotEmpty, null체크 java 에서와 같이 ( apache common Lib를 보면) isEmpty, isNotEmpty 함수를 만들어 쓰면 참 편하겠다 라는 생각이 들었다. javascript 에서도 아래와 같이 빈값 여부를 체크해서 true, flase로 리턴하는 함수를 만들어 사용하면 편하지 않을까 생각이 든다. var commonUtil = { isEmpty : function ( str ) { return (str == '' || str == undefined || str == null || str == 'null' ); }, isNotEmpty : function(str) { return !this.isEmpty(str); } }; comm.. 2021. 6. 21. 이전 1 다음