Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
[![Build Status](https://secure.travis-ci.org/caseywebdev/herit.png)](http://travis-ci.org/caseywebdev/herit)
Easy to use JavaScript "Class" inheritance with support for "instance" and "static" properties.
In the browser, simply include the script on the page.
In Node, all you need to do is var herit = require('herit')
.
var Animal = herit({
name: 'Chupacabra',
sound: 'roarmeowbarkmoo',
sing: function () {
alert(this.name + ' says ' + Array(5).join(this.sound));
}
});
var HardWorker = herit();
var Dog = herit(Animal, HardWorker, {
name: 'Gunner',
sound: 'woof'
}, {staticProp: 'hello'});
var Cat = herit(Animal, {
name: 'Mittens',
sound: 'meow'
});
(new Animal()).sing();
(new Cat()).sing();
(new Dog()).sing();
// (new Cat) instanceof Animal === true
// (new Cat) instanceof Cat === true
// Dog.staticProp === true
// (new Dog) instanceof Animal === true
// (new Dog) instanceof HardWorker === true
// (new Dog) instanceof Dog === true
FAQs
[![Build Status](https://secure.travis-ci.org/caseywebdev/herit.png)](http://travis-ci.org/caseywebdev/herit)
The npm package herit receives a total of 26 weekly downloads. As such, herit popularity was classified as not popular.
We found that herit 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.