console_info.js

import isJestTest from '../data/is-jest-test';

/**
 * @module consoleInfo
 * @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 { consoleInfo } from "@gravityforms/utils";
 *
 * function Example() {
 *     consoleInfo( 'Hello from example' );
 * }
 *
 */
export default function consoleInfo( message = '' ) {
	if ( process.env.RUN_MODE !== 'production' ) {
		if ( window.console && ! isJestTest() ) {
			console.info( message );
		}
	}
}