bb-class
v1.1.1
Published
[![npm](http://img.shields.io/npm/v/bb-class.svg?style=flat-square)](https://www.npmjs.com/package/bb-class) ![npm](http://img.shields.io/npm/l/bb-class.svg?style=flat-square) [![Dependency Status](https://david-dm.org/aliaksandr-pasynkau/bb-class.svg?sty
Downloads
6
Readme
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