react-hook-popup
Version:
Easily manage popups like alerts and modals in React with a single hook
11 lines (10 loc) • 343 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.enforceExistingPopup = void 0;
var consts_1 = require("./consts");
function enforceExistingPopup(popups, key) {
if (!popups[key]) {
throw new Error(consts_1.consts.UNFOUND_POPUP(key));
}
}
exports.enforceExistingPopup = enforceExistingPopup;