https://github.com/bcomnes/existy
Check if something exists (e.g. not null || undefined)
https://github.com/bcomnes/existy
Last synced: 9 months ago
JSON representation
Check if something exists (e.g. not null || undefined)
- Host: GitHub
- URL: https://github.com/bcomnes/existy
- Owner: bcomnes
- License: isc
- Created: 2015-11-16T04:22:09.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-05-25T04:10:05.000Z (about 6 years ago)
- Last Synced: 2024-12-17T15:42:59.275Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://npmjs.com/package/existy
- Size: 13.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# existy
[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![coverage][coverage-image]][coverage-url]
[npm-image]: https://img.shields.io/npm/v/existy.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/existy
[travis-image]: https://img.shields.io/travis/bcomnes/existy.svg?style=flat-square
[travis-url]: https://travis-ci.org/bcomnes/existy
[coverage-image]: https://img.shields.io/codeclimate/coverage/github/bcomnes/existy.svg?style=flat-square
[coverage-url]: https://codeclimate.com/github/bcomnes/existy
Check if something exists (e.g. not `null` || `undefined`)
A modularized version of the `existy` function found in [*Functional Javascript*](http://shop.oreilly.com/product/0636920028857.do) by [Michael Fogus](http://blog.fogus.me/).
## Install
```sh
$ npm i existy --save
```
## Usage
```js
var existy = require('existy')
existy(null) // false
existy(undefined) // false
existy(0) // true
existy(false) // true
```
## Contributing
Contributions welcome! Please read the [contributing guidelines](CONTRIBUTING.md) first.
# Related
- [`truthy`](https://www.npmjs.com/package/@bret/truthy)
## References
- [*Functional Javascript*](http://shop.oreilly.com/product/0636920028857.do) by [Michael Fogus](http://blog.fogus.me/)
- ["this is my best module"](https://twitter.com/substack/status/469024887949242368) - substack
## Licenses
[ISC](LICENSE)