1.3.1 • Published 10 years ago
existential-default v1.3.1
existential-default
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-defaultIf you want to use in the browser (powered by Browserify):
bower install existential-default --saveand 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