
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
a named arguments parser with a consistent robust protocol; via `folding` JavaScript argumenets in the sense of the computer language Scheme
A named-argument parser which also defines a consistent protocol for JavaScript functions.
function fold_args( 
    args,                 // : array of arguments, 
    default_args,         // : array or an object, 
    transformers_for_args // : array or an object )
const { fold_args } = require( 'fold-args' );
function func( ...args ) {
  const nargs = fold_args( args );
  console.log( nargs );
}
func( {foo:'FOO'}, {bar:'BAR'} );
> {foo:['FOO'], bar:['BAR']}
const { fold_args } = require( 'fold-args' );
function func( ...args ) {
  const nargs = fold_args( args, ['foo','bar'] );
  console.log( nargs );
}
// note that foo and bar are not specified.
func( {bum:'bum'} ); 
// foo and bar are appeared, though. 
> {foo:[],bar:[],bum:['bum']}
const { fold_args } = require( 'fold-args' );
const { the_last }  = require( 'fold-args' );
function func( ...args ) {
  const nargs = fold_args( args, [], [{ foo: the_last }] );
  console.log( nargs );
}
func( {foo:'foo'}, {foo:'FOO'} );
> {foo:'FOO'}
Each value in the arguments are processed in a same manner:
(o)=>( typeof o === 'object' ? o : {[Symbol.for(typeof o)] : o });
const o1 = {
  'foo' : 1,
};
const o2 = {
  'bar' : 2,
},
The processed object is
const processed = {
  'foo' : [1],
  'bar' : [2],
};
Thank you very much for your attention.
Atsushi Oka / I'm from Tokyo. For further information, see my github account.
FAQs
a named arguments parser with a consistent robust protocol for JavaScript; via `folding` argumenets in the sense of the computer language Scheme
We found that fold-args 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
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.