Skip to content

tjmehta/exists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exists

node exists function. plain and simple.

exists(thing)

returns true for anything other than null or undefined

var exists = require('exists');

exists(null);      // false
exists(undefined); // false
exists({});        // true
exists([]);        // true
exists('');        // true
exists(false);     // true

exists.allExist(thing)

returns true if all arguments are not null or undefined

var allExist = require('exists').allExist;

allExist(null, undefined);   // false
allExist({}, [], '', false); // true
allExist({}, null)  ;        // false

License

MIT

About

node exists function. plain and simple.

Resources

Stars

Watchers

Forks

Packages

No packages published