'use strict';

var formatErrorMessage = require('./format-error-message.js');

exports.warning = () => { };
exports.invariant = () => { };
if (typeof process !== "undefined" &&
    process.env?.NODE_ENV !== "production") {
    exports.warning = (check, message, errorCode) => {
        if (!check && typeof console !== "undefined") {
            console.warn(formatErrorMessage.formatErrorMessage(message, errorCode));
        }
    };
    exports.invariant = (check, message, errorCode) => {
        if (!check) {
            throw new Error(formatErrorMessage.formatErrorMessage(message, errorCode));
        }
    };
}
