Enumit
Super simple Enum's for JavaScript.
var Enum = ; var State = "ON" "OFF"; var myState = StateON; // myState is an instanceof EnumValue (private class of Enum)var value = myStatevalue; // Sets `value` to "ON"var num1 = StateON; // Sets `num1` to 1var num2 = StateOFF; // Sets `num2` to 2 console; // Calls toString() which in turns returns the value "ON"
Githooks
For developers contributing to this repo's source code, please run the following npm script:
npm run githooks
This script provides:
- pre commit: Runs jshint before commit is added to history.
- pre push: Runs tests before code is pushed up to remote.