https://github.com/killmenot/underscore-is-defined
isDefined for underscore, https://gist.github.com/turbobabr/11106163
https://github.com/killmenot/underscore-is-defined
Last synced: 7 months ago
JSON representation
isDefined for underscore, https://gist.github.com/turbobabr/11106163
- Host: GitHub
- URL: https://github.com/killmenot/underscore-is-defined
- Owner: killmenot
- License: mit
- Created: 2015-08-04T20:46:11.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-04T21:12:42.000Z (almost 11 years ago)
- Last Synced: 2025-03-06T13:04:28.283Z (about 1 year ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# _.isDefined
A quick shortcut to avoid of using `!_.isUndefined`
Original source: https://gist.github.com/turbobabr/11106163
Copyright (C) 2015 Alexey Kucherenko - https://github.com/killmenot
Licensed under the MIT
## Installation:
npm install underscore-is-defined
## Dependency:
One of
- [underscore.js](http://underscorejs.org/)
- [lodash.js](http://lodash.com/)
## Usage:
Load it, either as is (in the browser), as an AMD module, or as a CommonJS/Node.js module), then mix it in with the parent library (which must be explicitly injected):
_.mixin({isDefined: underscoreIsDefined(_)});
Call it like this:
var result = _.isDefined(foo)