JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1405
  • Score
    100M100P100Q103476F
  • License MIT

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

Package Exports

  • existential-default

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (existential-default) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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