import isJestTest from '../data/is-jest-test';
/**
* @module consoleLog
* @description Logs console info if console is available, node is not in production mode, and we aren't running Jest.
*
* @since 1.0.0
*
* @param {string} message The message to log.
*
* @requires isJestTest
*
* @return {void}
*
* @example
* import { consoleLog } from "@gravityforms/utils";
*
* function Example() {
* consoleLog( 'Hello from example' );
* }
*
*/
export default function consoleLog( message = '' ) {
if ( process.env.RUN_MODE !== 'production' ) {
if ( window.console && ! isJestTest() ) {
console.log( message );
}
}
}