UNPKG

aztec

Version:

Node Js Framework for creating API Services

27 lines (26 loc) 741 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("colors"); class Handler { static error(err) { if (this.env === 'development' || this.env === 'test') throw new Error(`${err}`); } static warning(warn) { if (this.env === 'development') { console.log(''); console.warn(`AZTEC Warning: ${warn}`.yellow); console.log(''); } } static info(info) { if (this.env === 'development') console.info('AZTEC Info: ' + info.blue); } static userError(err) { if (this.env === 'development') throw new Error(`${err}`); } } Handler.env = 'development'; exports.Handler = Handler;