
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
Simple classical inheritance that is a whopping ten lines. Its Augment without the augment.
In the words of Aadit Shah
No premature optimization. No need to read the documentation of libraries like ClassManager. I can directly focus on the task at hand and optimize those things that really need optimization.
const defclass = require('defclass');
const Beer = defclass({
constructor: function (type) {
this.type = type;
this.count = 100;
this.temp = 'cold';
},
getADrink: function () {
--this.count;
console.log(`Here's a ${this.temp} ${this.type}!`);
}
});
const favBeer = new Beer('Spotted Cow');
favBeer.getADrink(); // Here's a cold Spotted Cow!
If you need to inherit from another class use extend.
const GrabAnother = defclass.extend(Beer, {
sing: function () {
console.log(`${this.count} bottles of ${this.temp} ${this.type}'s on the wall.`);
}
});
const makeMeDance = new GrabAnother(`John's White Ale`);
makeMeDance.getADrink(); // Here's a John's White Ale!
makeMeDance.sing(); // 99 bottles of cold John's White Ale's on the wall.
FAQs
Simple classical inheritance.
We found that defclass 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

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.