Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

existential-default

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

existential-default

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

  • 1.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
650
increased by2.36%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 30 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc