Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript module that tells you if the value is empty. Empty values are '', undefined, null, [], {}, and objects with no enumerable properties.
JavaScript CSS
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
License
browser
dev
node_modules
specs
src
.gitattributes
.gitignore
Readme.md
package.json

Readme.md

isEmpty

Tells you if the value is empty. Empty values are '', undefined, null, [], {}, and objects with no enumerable properties.

Installation

npm install atropa-is-empty

Usage

In node:

var isEmpty = require('atropa-is-empty');
console.log(isEmpty('')); // logs true
console.log(isEmpty('x')); // logs false

In the browser, include ./browser/is-empty_web.js in your page. isEmpty will be available in your page. see the example in ./browser/index.html

Something went wrong with that request. Please try again.