Class-js is a project mainly written in JavaScript, it's free.
Class.js – a simple JavaScript inheritance API
Class.js – tools for standard inheritance in JavaScript
[1] http://ejohn.org/blog/simple-javascript-inheritance/ [2] https://github.com/rauschma/proto-js
===== Code example =====
// Superclass var Person = Class.extend({ constructor: function (name) { this.name = name; }, describe: function() { return "Person called "+this.name; } });
// Subclass var Worker = Person.extend({ constructor: function (name, title) { Worker.super.constructor.call(this, name); this.title = title; }, describe: function () { return Worker.super.describe.call(this)+" ("+this.title+")"; // (*) } }); var jane = new Worker("Jane", "CTO");