Skip to content
This repository has been archived by the owner on May 2, 2021. It is now read-only.

Kikobeats/existential

Repository files navigation

Existential

Last version Build Status Dependency status Dev Dependencies Status NPM Status Donate

The missing existential operator for JavaScript. Returns true unless a variable is null or undefined.

Install

npm install existential

If you want to use in the browser (powered by Browserify):

bower install existential --save

and later link in your HTML:

<script src="bower_components/existential/dist/existential.js"></script>

Usage

var exists = require('existential');

console.log(exists(null));
// => false

console.log(exists('hello world'));
// => true

Related

License

MIT © Kiko Beats

About

The missing existential operator for JavaScript.

Resources

License

Stars

Watchers

Forks

Packages

No packages published