@carbon/ibm-products-web-components
Version:
Carbon for IBM Products Web Components
31 lines (28 loc) • 927 B
JavaScript
/**
* Copyright IBM Corp. 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
//
// Copyright IBM Corp. 2020, 2021
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//
const isProduction = process.env.NODE_ENV === 'production';
const noop = () => undefined;
const shimIfProduction = (fn) => (isProduction ? noop : fn);
const log = shimIfProduction((...args) => console.log(...args));
const warn = shimIfProduction((...args) => console.warn(...args));
const error = shimIfProduction((...args) => console.error(...args));
var pconsole = {
isProduction,
noop,
shimIfProduction,
log,
warn,
error,
};
export { pconsole as default, error, isProduction, log, noop, shimIfProduction, warn };
//# sourceMappingURL=pconsole.js.map