UNPKG

tsdk

Version:

Type-safe API development and code share tool for TypeScript projects.

35 lines (34 loc) 1.14 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const chalk_1 = __importDefault(require("chalk")); /* c8 ignore next 4 */ const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color'; const folder = '└─'; const space = ' '; const main = { info: chalk_1.default.blue('ℹ'), success: chalk_1.default.green('✔'), warning: chalk_1.default.yellow('⚠'), error: chalk_1.default.red('✖'), bullet: '●', folder, space, }; const fallbacks = { info: chalk_1.default.blue('i'), success: chalk_1.default.green('√'), warning: chalk_1.default.yellow('‼'), error: chalk_1.default.red('×'), bullet: '*', folder, space, }; function get(name) { /* c8 ignore next */ const symbols = isSupported ? main : fallbacks; return symbols[name]; } exports.default = Object.assign(Object.assign({}, (isSupported ? main : /* c8 ignore next */ fallbacks)), { get });