Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

structr

0.3.2 • Public • Published

Structr is a thin class library that helps create, and extend prototypes.

Example

 
 
function Animal(name) {
  this.name = name;
}
 
function Cat(name) {
  Cat.__super__.apply(this, arguments);
}
 
structr(Animal, Cat, {
  meow: function() {
    console.log(this.name + ": meow");
  }
});
 
 

Keywords

none

Install

npm i structr

DownloadsWeekly Downloads

3,501

Version

0.3.2

License

none

Last publish

Collaborators

  • avatar