Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

underscore-is-defined

0.0.1 • Public • Published

_.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

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)

Install

npm i underscore-is-defined

DownloadsWeekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • avatar