
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
assign-args
Advanced tools
Like Function.prototype.bind, but let's you assign farther-right arguments first, incrementally assign properties on an object argument, and overwrite previously assigned arguments.
$ npm install assign-args
// How to require:
const assign = require('assign-args');
test('assigning farther-right arguments first', () => {
const y = (m, x, b) => m*x + b;
const oneArg = assign(y, undefined, undefined, 3);
const twoArgs = assign(oneArg, undefined, 2);
expect(twoArgs(1)).toBe(5);
});
test('incrementally assigning properties on an object argument', () => {
const y = ({ m, x }, b) => m*x + b;
const oneArg = assign(y, undefined, 3);
const twoArgs = assign(oneArg, { x: 2 });
expect(twoArgs({ m: 1 })).toBe(5);
});
test('overwriting previously assigned args', () => {
const y = ({ m, x }, b) => m*x + b;
const withArgs = assign(y, { m: 2, x: 2 }, 5);
expect(withArgs()).toBe(9);
const withArgsRedone = assign(withArgs, { m: 3 }, 10);
expect(withArgsRedone()).toBe(16);
});
const getFoo = function(...args) {
return this.foo + args.join('');
};
test('binding context/this before', () => {
const withCtx = getFoo.bind({ foo: 'bar' });
const withCtxAndArg = assign(withCtx, 1);
expect(withCtxAndArg()).toBe('bar1');
});
test('binding context/this between', () => {
const withArg = assign(getFoo, undefined, 2);
const withCtxAndArg = withArg.bind({ foo: 'bar' });
const withCtxAnd2Args = assign(withCtxAndArg, 1);
expect(withCtxAnd2Args()).toBe('bar12');
})
test('binding contet/this after', () => {
const withArg = assign(getFoo, 1);
const withCtxAndArg = withArg.bind({ foo: 'bar' });
expect(withCtxAndArg()).toBe('bar1');
});
FAQs
A funner Function.prototype.bind
The npm package assign-args receives a total of 1 weekly downloads. As such, assign-args popularity was classified as not popular.
We found that assign-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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.