Yet another JavaScript class library: Classy

Update: this is now called MiniClass.

JavaScript's prototypical nature can be confusing. Even fantastic explanations can take a couple of read-throughs before it's clear. I've felt confident in it for awhile, but I wanted to test myself, so I wrote Classy.

Here's an example of how Classy works:

var MagicalPerson = Classy.extend({
  initialize: function(first) {
    this.firstName = first;
  },
  introduce: function() {
    return "I'm a " + this.type + " and my name is " + this.firstName + "!";
  }
});

var Wizard = MagicalPerson.extend({
  type: "wizard"
});

var merlin = new Wizard("Merlin");
merlin.introduce();  // => "I'm a wizard and my name is Merlin!"

It was also a chance for me to learn Mocha, the up-and-coming JavaScript testing framework.

Go give it a look, and tell me if I didn't understand something about prototypes!