UNPKG

prepack

Version:

Execute a JS bundle, serialize global state and side effects to a snapshot that can be quickly restored.

28 lines (24 loc) 803 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = invariant; var _errors = require("./errors.js"); /** * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ /* strict */ function invariant(condition, format = "") { if (condition) return; const message = `${format} This is likely a bug in Prepack, not your code. Feel free to open an issue on GitHub.`; let error = new _errors.InvariantError(message); error.name = "Invariant Violation"; throw error; } //# sourceMappingURL=invariant.js.map