UNPKG

@nozbe/watermelondb

Version:

Build powerful React Native and React web apps that scale from hundreds to tens of thousands of records and remain fast

14 lines (13 loc) 502 B
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); exports.__esModule = true; exports.default = invariant; var _diagnosticError = _interopRequireDefault(require("../diagnosticError")); // If `condition` is falsy, throws an Error with the passed message function invariant(condition, errorMessage) { if (!condition) { var error = (0, _diagnosticError.default)(errorMessage || 'Broken invariant'); error.framesToPop += 1; throw error; } }