react-native-modalize-custom-handle
Version:
A highly customizable modal/bottom sheet that loves scrolling content.
22 lines (21 loc) • 656 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.invariant = void 0;
const genericMessage = 'Invariant Violation "react-native-modalize"';
const { setPrototypeOf = (obj, proto) => {
obj.__proto__ = proto;
return obj;
}, } = Object;
class InvariantError extends Error {
constructor(message = genericMessage) {
super(`${message}`);
this.framesToPop = 1;
this.name = genericMessage;
setPrototypeOf(this, InvariantError.prototype);
}
}
exports.invariant = (condition, message) => {
if (condition) {
throw new InvariantError(message);
}
};