Errorable
Create javascript errors in a smart & simple way.
Usage
Defines an IErrorOptions object
JSON files are totally ok for ease of maintance.
; ;
Generate errors
; ; // Got three errors:// errors.ILoveYou// errors.MeLoveYou// errors.Hello
or
;; // Got three errors:// errors.I_LOVE_YOU// errors.ME_LOVE_YOU// errors.HELLO
Create and throw localized errors
;throw new ILoveYou"zh-CN";throw new Hello"en-US";
Load from or save to files
; // Saving json to filesGenerator.savejsonFilename, json; // Loading json from files; // json equals newJsonexpectjson.toEqualnewJson;
License
MIT © calidion