chalk.js 758 B

123456789101112131415161718192021222324252627282930
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. // In the web runtime, we create an alternative object that just outputs the
  7. // message to the console without any styling. The same APIs are supported
  8. // for compatibility:
  9. // - chalk.red('error')
  10. // - chalk.bold.cyan('message')
  11. // - chalk.hex('#fff').underline('hello')
  12. const chalk = new Proxy((s)=>s, {
  13. get (_, prop) {
  14. if ([
  15. "hex",
  16. "rgb",
  17. "ansi256",
  18. "bgHex",
  19. "bgRgb",
  20. "bgAnsi256"
  21. ].includes(prop)) {
  22. return ()=>chalk;
  23. }
  24. return chalk;
  25. }
  26. });
  27. var _default = chalk;
  28. exports.default = _default;
  29. //# sourceMappingURL=chalk.js.map