I just released https://github.com/alessioalex/Cls 3 days ago. It's very lightweight, has 3 functions under the hood (a mixin function to copy properties, a extends function for inheritance and the Cls function that parses the arguments and uses the previous two).
This works for Node.js & the browser and I've tried my best to document & test it well.
An example of the syntax:
var Person = Cls({
methods: {
constructor: function(name, age) {
this.name = name;
this.age = age;
},
present: function(otherDude) {
return "Hello " + otherDude + " I'm " + this.name + ", my age is: " + this.age;
}
},
});
var Student = Cls({
// extends the Person class
uber: Person,
present: function() {
/**
* call super function
* note that this approach works even async (unlike other class libs)
*/
return this.inherited('present', arguments);
}
});
/**
* since the constructor is missing
* it will call the super constructor automatically
*/
var alex = new Student('Alex', 25);
alex.present();