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

ee-arguments

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ee-arguments

assign values passed to a function to a variable by their type and optional by their index

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ee-arguments

assign values passed to a function to a variable by their type and optional by their index. you may pass also a default value for each variable

installation

npm install ee-arguments

usage

// syntax
var myVariable = arg( arguments, expectedType, [defaultValue], [index] );

var   arg = require( "ee-arguments" )
	, log = require( "ee-log" );


var test = function(){
	var callback = arg( arguments, "function", function(){ log.info( "default function" ); } );
	callback();
}


// prints «default function»
test(); 

// prints «custom function»
test( function(){ log.info( "custom function" ); } );

// prints «custom function»
test( 1, null, new Error(), function(){ log.info( "custom function" ); }, "fancy_string" ); 

FAQs

Package last updated on 30 Apr 2014

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