Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
19 lines
540 B
Plaintext
19 lines
540 B
Plaintext
import { formatErrorMessage } from './format-error-message.mjs';
|
|
|
|
let warning = () => { };
|
|
let invariant = () => { };
|
|
if (process.env.NODE_ENV !== "production") {
|
|
warning = (check, message, errorCode) => {
|
|
if (!check && typeof console !== "undefined") {
|
|
console.warn(formatErrorMessage(message, errorCode));
|
|
}
|
|
};
|
|
invariant = (check, message, errorCode) => {
|
|
if (!check) {
|
|
throw new Error(formatErrorMessage(message, errorCode));
|
|
}
|
|
};
|
|
}
|
|
|
|
export { invariant, warning };
|