existential
Version:
The missing existential operator for JavaScript. Returns true unless a variable is null or undefined
45 lines (30 loc) • 1.4 kB
Markdown
# Existential

[](https://travis-ci.org/Kikobeats/existential)
[](https://david-dm.org/Kikobeats/existential)
[](https://david-dm.org/Kikobeats/existential#info=devDependencies)
[](https://www.npmjs.org/package/acho)
[](https://paypal.me/kikobeats)
> The missing existential operator for JavaScript. Returns true unless a variable is `null` or `undefined`.
## Install
```bash
npm install existential
```
If you want to use in the browser (powered by [Browserify](http://browserify.org/)):
```bash
bower install existential --save
```
and later link in your HTML:
```html
<script src="bower_components/existential/dist/existential.js"></script>
```
## Usage
```js
var exists = require('existential');
console.log(exists(null));
// => false
console.log(exists('hello world'));
// => true
```
## License
MIT © [Kiko Beats](http://www.kikobeats.com)