It wires up the prototype chain (inheritance) and copies things into the prototype object (your class's definition) and that's it. It does not add its own properties or methods to your objects. It does not create a
super method or property. It has essentially zero features. It's wonderful.
var MyClass = ;
classDefinition should be an object containing all of the functions you want the class to have. If one of those functions is named
constructor, it will be used as the class's constructor.
You may optionally pass a
superclass to inherit from, plus any number of
// Basic usagevar MyClass =;// Here 'Fruit' is the superclass, and 'Edible' and 'Squeezable' are mixins.var Orange =;// No superclass but mixinsvar Foo =;
Copyright (c) 2012 Ned Burns Licensed under the MIT license. http://github.com/7sempra/classdef/blob/master/LICENSE-MIT