UNPKG

@carbon/ibm-products

Version:
22 lines (20 loc) 667 B
/** * Copyright IBM Corp. 2020, 2026 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ //#region src/global/js/utils/pconsole.js const isProduction = process.env.NODE_ENV === "production"; const noop = () => void 0; const shimIfProduction = (fn) => isProduction ? noop : fn; var pconsole_default = { isProduction, noop, shimIfProduction, log: shimIfProduction((...args) => console.log(...args)), warn: shimIfProduction((...args) => console.warn(...args)), error: shimIfProduction((...args) => console.error(...args)) }; //#endregion exports.default = pconsole_default;