Created
October 5, 2016 17:33
-
-
Save toddsby/dc8f8120487dcae87817d86bf6cb97ce to your computer and use it in GitHub Desktop.
ES6 javascript helper to check for undefined, null, or empty values
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
| /* | |
| * cUN: helper to check for undefined, null, or empty values | |
| **/ | |
| export const cUN = ( value ) => { | |
| if ( type of value == 'undefined' || value === '' || value === null || value !== value ) return true; | |
| else return false; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have a type:
line 5, typeof - not type of.