UNPKG

@mopinion/deploy

Version:

Deploy your Mopinion feedback forms with ease

34 lines (28 loc) 796 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getRule = getRule; exports.removeRule = removeRule; exports.ruleInstances = void 0; exports.setRule = setRule; var ruleInstances = {}; exports.ruleInstances = ruleInstances; function getRule() { var fn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {}; return fn(ruleInstances); } function setRule() { var fn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {}; var newState = fn(ruleInstances); if (newState) { Object.assign(ruleInstances, newState); } } function removeRule(id) { try { ruleInstances[id].cleanupThen(true); } catch (e) {} delete ruleInstances[id]; } //# sourceMappingURL=ruleInstances.js.map