Safe Enum
Define enums as a getter function, so you'll get descriptive runtime exceptions not undefined
if you make a typo.
var enums = ; exportsdateFormats = ;exportsdateFormatsFromObject = ; exports; // usUkexports; // Error exports; // 'gb'
This is for constants you'll expose in a module - for internal constants, it's easier to
define as var SOME_CONSTANT = 'blah'
and use jshint
to references to undeclared variables.
Install
npm i -S safe-enum