if-defined

1.0.18 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i if-defined

Weekly Downloads

24

Version

1.0.18

License

MIT

Unpacked Size

2.53 kB

Total Files

5

Last publish

Collaborators

  • ersun.warncke