Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@stamp/arg-over-prop
Advanced tools
Assign properties passed to the stamp factory
import ArgOverProp from '@stamp/arg-over-prop';
const StampA = compose({
properties: {
foo: 1
}
})
.compose(ArgOverProp).argOverProp('foo');
const instance1 = StampA(); // { foo: 1 }
const instance2 = StampA({ foo: 999 }); // { foo: 999 }
A shorter but identical version of the same StampA
:
const StampA = ArgOverProp.argOverProp({foo: 1});
Or if you don't want to import the stamp you can import only the method:
import {argOverProp} from '@stamp/arg-over-prop';
const StampA = argOverProp({foo: 1});
Basically, the arg-over-prop
stamp sets properties in an initializer.
The code below is what the StampA
becomes.
const StampA = compose({
properties: {
foo: 1
},
initializers: [function (opts) {
this.foo = opts.foo;
}]
})
import ArgOverProp from '@stamp/arg-over-prop';
const HasColor = ArgOverProp.argOverProp('color', 'background');
const HasPoint = ArgOverProp.argOverProp({ x: 0, y: 0 });
const ColorPoint = compose(HasColor, HasPoint);
const point = ColorPoint({ color: 'blue', x: 15 });
console.log(point.color); // "blue"
console.log(point.background); // undefined
console.log(point.x); // 15
console.log(point.y); // 0
FAQs
Assign properties passed to the stamp factory
The npm package @stamp/arg-over-prop receives a total of 113 weekly downloads. As such, @stamp/arg-over-prop popularity was classified as not popular.
We found that @stamp/arg-over-prop 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.