storybook
Version:
Storybook: Develop, document, and test UI components in isolation
24 lines (21 loc) • 563 B
JavaScript
import {
__name
} from "./chunk-MM7DTO55.js";
// ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
var isProduction = process.env.NODE_ENV === "production";
var prefix = "Invariant failed";
function invariant(condition, message) {
if (condition) {
return;
}
if (isProduction) {
throw new Error(prefix);
}
var provided = typeof message === "function" ? message() : message;
var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
throw new Error(value);
}
__name(invariant, "invariant");
export {
invariant
};