Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
dynamic-on-change
Advanced tools
An utility for managing on change functions. This is meant to be used with react components for avoiding binding instance methods.
Typescript support. Made in typescript ;)
import dynamicOnChange from "./index";
const a = {
hello: "world",
foo: 3,
};
const onChange = dynamicOnChange<typeof a>((key, value) => {
a[key] = value;
});
onChange.foo(5);
expect(a).toMatchObject({ hello: "world", foo: 5 });
onChange.hello("me");
expect(a).toMatchObject({ hello: "me", foo: 5 });
// invalid in typescript
onChange.foo("hello"); // error: Argument of type '"hello"' is not assignable to parameter of type 'number'.
onChange.hello(3); // error: Argument of type '3' is not assignable to parameter of type 'string'.
onChange.asdf("me"); // error: Property 'asdf' does not exist on type 'dynamicOnChanges<{ hello: string; foo: number; }>'.
FAQs
An utility for managing on change functions
The npm package dynamic-on-change receives a total of 1 weekly downloads. As such, dynamic-on-change popularity was classified as not popular.
We found that dynamic-on-change 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.