A simple yet powerful Ruby-like Class inheritance system


A super simple ruby like class system with class property and instance property inheritance.

var Animal =
new Animal //=> TypeError: object is not a function 

The reason Animal is not a Function is because functions cannot delegate their properties to another Function.

var Animal ={
    this.birthdate = new Date;
var Mammal = Animal.subclass(function(){
  this.initialize = function(name){ = name
var Dog    = Mammal.subclass();
var Cat    = Mammal.subclass();
var sparky ='sparky');
var mitten ='mitten');
npm install mocha
npm install expect.js
mocha -R list