legado
Version:
A very simple and minimalist inheritance system
37 lines (26 loc) • 764 B
Markdown
legado
======
[](https://travis-ci.org/nicolas-van/legado) [](https://www.npmjs.com/package/legado)
A very simple and minimalist inheritance system.
Examples:
import legado from "legado";
var Base = legado({
constructor: function() {
this.a = "a";
},
x: function() {
return this.a;
}
});
var Sub = legado(Base, {
constructor: function() {
Base.prototype.constructor.apply(this);
this.b = "b";
},
y: function() {
return this.x() + this.b;
},
});
To install:
npm install legado
Or download it on https://unpkg.com/legado/