fake_chalk.js 993 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. var _ansiStyles = require('ansi-styles');
  3. var _ansiStyles2 = _interopRequireDefault(_ansiStyles);
  4. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  5. const returnInput = str => str; /**
  6. * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
  7. *
  8. * This source code is licensed under the MIT license found in the
  9. * LICENSE file in the root directory of this source tree.
  10. *
  11. */
  12. const allColorsAsFunc = Object.keys(_ansiStyles2.default).map(style => ({ [style]: returnInput })).reduce((acc, cur) => Object.assign(acc, cur));
  13. Object.keys(allColorsAsFunc).map(color => allColorsAsFunc[color]).forEach(style => {
  14. Object.assign(style, allColorsAsFunc);
  15. Object.assign(returnInput, style);
  16. });
  17. module.exports = allColorsAsFunc;