UNPKG

node-hot-loader

Version:

Hot module replacement for Node.js applications

22 lines (20 loc) 1.2 kB
"use strict"; exports.__esModule = true; exports.default = void 0; function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } class LogColors {} // Make functions from LogColors.defaultColors which apply string and surround it with color definition. exports.default = LogColors; _defineProperty(LogColors, "defaultColors", { bold: '\u001b[1m', yellow: '\u001b[1m\u001b[33m', red: '\u001b[1m\u001b[31m', green: '\u001b[1m\u001b[32m', cyan: '\u001b[1m\u001b[36m', magenta: '\u001b[1m\u001b[35m' }); Object.keys(LogColors.defaultColors).forEach(color => { LogColors[color] = str => `${LogColors.defaultColors[color]}${str}\u001b[39m\u001b[22m`; });