defos

if (typeof x !== 'undefined' && x !== null) replacement

npm install defos
2 downloads in the last month

defos

Sugar for js: if (typeof x !== undefined && x !== null){ foo(x) }

To use with front end scripts:

ender add defos

To use with nodejs

npm install defos
npm loves you