mihawk
Version:
A tiny & simple mock server tool, support json,js,cjs,ts(typescript).
36 lines (35 loc) • 956 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Printer = exports.Debugger = void 0;
const debug_1 = __importDefault(require("debug"));
const consts_1 = require("../consts");
exports.Debugger = { log: (0, debug_1.default)(consts_1.PKG_NAME) };
exports.Printer = {
log(...args) {
if (args.length) {
console.log(consts_1.LOG_FLAG, ...args);
}
else {
console.log();
}
},
warn(...args) {
if (args.length) {
console.warn(consts_1.LOG_FLAG, ...args);
}
else {
console.warn();
}
},
error(...args) {
if (args.length) {
console.error(consts_1.LOG_FLAG, ...args);
}
else {
console.error();
}
},
};