baseclass

0.3.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.0
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.0
    6
  • 0.2.2
    2
  • 0.2.1
    1
  • 0.2.0
    1
  • 0.1.1
    2

Package Sidebar

Install

npm i baseclass

Weekly Downloads

3

Version

0.3.0

License

MIT

Last publish

Collaborators

  • aearly