Abitbol
Abitbol is a small Javascript library that provides consistent/easy to use
classes for Node.js and web browsers. It is heavily inspired by Armin
Ronacher's Classy library, but extends its possibilities.
Features:
- Simple inheritance
- Consistent
this
(always points to the current instance) - Annotations
- Computed properties automatically generated from getters and setters
- Simple way to call a super class method
- Simple way to declare static properties
- Handful mixin
Exemple class definition:
var Vehicle = Class.$extend({
__init__: function(color) {
this.color = color;
this.speed = 0;
},
move: function(speed) {
this.speed = speed;
},
stop: function() {
this.speed = 0;
}
});
The classiest javascript class library of the world
-- George Abitbol
Install
To install Abitbol run the following command:
npm install abitbol
Documentation
Contributing
Questions
If you have any question, you can:
Bugs
If you found a bug, please open an issue on Github with as much information as possible.
Pull Requests
Please consider filing a bug before starting to work on a new feature. This will allow us to discuss the best way to do it. This is of course not necessary if you just want to fix some typo or small errors in the code.
Coding Style / Lint
To check coding style, run the follwoing command:
npx grunt lint
Tests
Tu run tests, use the following command:
npx grunt test
Build For Browsers
To generate browser version of the lib (files in the dist/
folder), run:
npx grunt
Changelog