UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

27 lines (22 loc) 747 B
/** * MSKCC 2021, 2024 */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const emptyFunction = function () {}; const warning = process.env.NODE_ENV !== "production" ? function warning(condition, format) { for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { args[_key - 2] = arguments[_key]; } if (format === undefined) { throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'format argument'); } if (!condition) { let index = 0; const message = format.replace(/%s/g, () => { return args[index++]; }); console.warn('Warning: ' + message); } } : emptyFunction; exports.warning = warning;