if-defined
v1.0.18
Published
Return true if value is defined
Downloads
16
Readme
if-defined
const defined = require('if-defined')
var x
if (!defined(x)) {
console.log('foobar')
}
Test value to see if it is defined. Return true or false.
The evaluation of defined is done as:
x !== undefined