
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
class-action
Advanced tools
This is a simple library for creating composable functions. It helps to create methods or functions that may need to be modified later without introducing performance issues from multiple code compilation.
A class action is simply an object with a local action method and an optional list of reaction objects which are also ClassAction instances. Not only can reactions be added or removed later and nested to any depth, but the classes can be extended and composed freely to achieve whatever effect we want. We have used class-action as the primary abstraction for implementing a transparent and extensible reactivity system in element-action.
npm i class-action
import { ClassAction } from "class-action";
class MyClassAction extends ClassAction {
constructor(value, ...reactions) {
super(...reactions);
this.value = value;
}
doAction(context) {
context.value = (context.value || 0) + this.value;
}
}
const myClassAction = new MyClassAction(5, new MyClassAction(2), new MyClassAction(7));
const myContext = { };
myClassAction.act(myContext);
console.log(myContext); // prints 14
myClassAction.act(myContext);
console.log(myContext); // prints 28
myClassAction.reactions.splice(0, 1);
myClassAction.act(myContext);
console.log(myContext.value); // prints 40
This library exports a single class with a very simple API which can be picked up in a few minutes here.
Help improve Class-action by contributing to this project. You can contribute in many ways. See the contributing guidelines. You can also show your support by sponsoring us.
Thank you for contributing.
...
FAQs
A simple library for writing composable functions and methods
The npm package class-action receives a total of 2 weekly downloads. As such, class-action popularity was classified as not popular.
We found that class-action 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.