Neurologically Paralyzing Mouseovers

npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

existential-default

1.3.1 • Public • Published

existential-default

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

Check for the existential value of a variable. Assign value by default.

This module have the same behavior than existential-assign where the unique change is the order of the parameters to be more natural and not align with Object.assign interface.

Install

npm install existential-default

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

bower install existential-default --save

and later link in your HTML:

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

Usage

var existsDefault = require('existential-default');
var hello = null;
hello = existsDefault(hello, 'world');
console.log(hello);
// => 'world'

License

MIT © Kiko Beats

install

npm i existential-default

Downloadsweekly downloads

844

version

1.3.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability