bb-class

1.1.1 • Public • Published

npm npm Dependency Status devDependency Status Build Status Coverage Status

bb-class

LightWeight (Backbone like) implementation of class for JS.

Getting started

To install bb-class from npm, run:

npm install -g bb-class --save

Finally, use the library:

'use strict';
 
bbClass = require('bb-class');
 
var MyClass = bbClass.extend(prototypePropsObject, staticPropsObject);
var MyClassChild = MyClass.extend(anotherPrototypePropsObject, anotherStaticPropsObject);
 
var myClassInstance = new MyClass();
var myClassChildInstance = new MyClassChild();
 
myClassInstance instanceof myClassInstance; // true
 
myClassChildInstance instanceof MyClassChild; // true
 
myClassChildInstance instanceof myClassInstance; // true
 
// do something helpful

You can read more examples in test directory of this repository

Enjoy!

Support

If you have any problems, you cached a bug, or you have any suggestion - please find an existing issue or create new

Contributing

If you want to develop this library do not be shy - Do that! How to contribute open-source projects

Run tests bb-class

$ npm i -g grunt-cli
$ npm test

Readme

Keywords

none

Package Sidebar

Install

npm i bb-class

Weekly Downloads

1

Version

1.1.1

License

MIT

Last publish

Collaborators

  • alxe.master