UNPKG

debug-color2

Version:

colorize console log, this module can work with require('debug')

34 lines 1.03 kB
"use strict"; /** * Created by user on 2018/6/26/026. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.styleNamesWithoutFn = exports.styleNamesFn = exports.styleNames = exports.getStyleNamesByChalk = void 0; const tslib_1 = require("tslib"); const chalk_1 = tslib_1.__importDefault(require("chalk")); tslib_1.__exportStar(require("./types"), exports); function getStyleNamesByChalk(chalk) { const prototype = chalk.constructor.prototype; return Object .getOwnPropertyNames(prototype) .filter(v => v != 'constructor'); } exports.getStyleNamesByChalk = getStyleNamesByChalk; exports.styleNames = getStyleNamesByChalk(chalk_1.default); exports.styleNamesFn = [ 'rgb', 'hsl', 'hsv', 'hwb', 'bgHex', 'bgKeyword', 'bgRgb', 'bgHsl', 'bgHsv', 'bgHwb', 'hex', 'keyword', ]; exports.styleNamesWithoutFn = exports.styleNames.filter(name => !exports.styleNamesFn.includes(name)); exports.default = exports; //# sourceMappingURL=styles.js.map