existential-default-deep

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

Usage no npm install needed!

<script type="module">
  import existentialDefaultDeep from 'https://cdn.skypack.dev/existential-default-deep';
</script>

README

existential-default-deep

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

Deep version of existential-default.

Install

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>

Usage

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

License

MIT © Kiko Beats