baseclass

A modularization of Backbone.js's extend() function for use with JS classes.

npm install baseclass
8 downloads in the last day
56 downloads in the last week
177 downloads in the last month

baseclass

For when you just want Backbone's Class.extend() function.

Build Status

Backbone.js style inheritance. The extend function has been taken directly from Backbone. This is really @bermi 's idea.

Very similar to uberclass and class.js -- the main difference is that the prototype props and static props order has been reversed.

Usage

var BaseClass = require("baseclass");

var MyClass = BaseClass.extend({
    someProp: 'My property value',
    someMethod: function () { ... },
    constructor: function (arg1, arg2) { ... }
},{
    optionalStaticProp = "MyClass.optionalStaticProp"
});

var inst = new MyClass(arg1, arg2);

Licence

MIT

npm loves you