Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.
/ legado Public archive

A very simple and minimalist inheritance system for JavaScript

License

Notifications You must be signed in to change notification settings

nicolas-van/legado

Repository files navigation

legado

Build Status npm

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/

About

A very simple and minimalist inheritance system for JavaScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published