Deep version of existential-default.
npm install existential-default-deep
If you want to use in the browser (powered by Browserify):
bower install existential-default-deep --save
and later link in your HTML:
<script src="bower_components/existential-default-deep/dist/existential-default-deep.js"></script>
var existsDefault = require('existential-default-deep');
var hello = null;
hello = existsDefault(hello, 'world');
console.log(hello);
// => 'world'
- existential – The missing existential operator for JavaScript.
- existential-assign – Check for the existential value of a variable/object. Assign one if the value doesn't exist.
- existential-default – Check for the existential value of a variable and assign a value by default.
MIT © Kiko Beats