Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
ee-arguments
Advanced tools
parses the arguments array passed to a function by variable type and their position in the array, returns the requested type & position
parses the arguments array passed to a function by variable type and their position in the array, returns the requested type & position
npm install ee-arguments
Creates an instance of the Arguments class bound to the current arguments object.
var Arguments = require('ee-arguments');
var myFunction(){
var args = new Arguments(arguments);
};
myFunction();
Get the first occurence of a specific type from the arguments object, return an optional defined default if the type is not found.
var myFunction(){
var args = new Arguments(arguments);
args.get('string', 'defaultValue'); // do not use strings this way!
args.get('boolean', true); // true
};
myFunction(1, new String('do not use strings this way!'), 'second string');
Returns the item of the defined type and the defined index from the arguments object. return an optional defined default if the type is not found.
var myFunction(){
var args = new Arguments(arguments);
args.getByIndex('string', 1, function default(){}); // second string
args.getByIndex('string', 5); // undefined
};
myFunction(1, new String('do not use strings this way!'), 'second string');
For the types defined below there are specific methods available
string
number
boolean
array
object
function
date
regexp
error
undefined
buffer
null
var myFunction(){ var args = new Arguments(arguments);
args.getString(); // do not use strings this way!
args.getNumberByIndex(1, 'defaultValue'); // second string
};
myFunction(1, new String('do not use strings this way!'), 'second string');
FAQs
parses the arguments array passed to a function by variable type and their position in the array, returns the requested type & position
The npm package ee-arguments receives a total of 12 weekly downloads. As such, ee-arguments popularity was classified as not popular.
We found that ee-arguments demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.