constant-enum
Generates a frozen object with matching keys and values
Installation
$ npm install constant-enum
Usage
var en = ;;// oren;// results in -> MON: 'MON' TUES: 'TUES' WEDS: 'WEDS'
Why?
We found this pattern helpful when implementing Facebook's Flux architecture. We use this pattern as an alterative to the one demonstrated in the Flux TodoMVC example.