Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Check whether a value is empty.
JavaScript
branch: master
Failed to load latest commit information.
test first commit
.gitignore first commit
History.md
Makefile first commit
Readme.md first commit
component.json first commit
index.js
package.json first commit

Readme.md

is-empty

Check whether a value is empty.

Installation

$ component install ianstormtaylor/is-empty
$ npm install is-empty

Example

var empty = require('is-empty');

empty([]);              // true
empty({});              // true
empty('');              // true
empty(0);               // true
empty(function(){});    // true
empty(null);            // true
empty(undefined);       // true

empty(['a', 'b']);      // false
empty({ a: 'b' });      // false
empty('string');        // false
empty(42);              // false
empty(function(a,b){}); // false

API

isEmpty(value)

Check whether value is empty.

License

MIT

Something went wrong with that request. Please try again.