UNPKG

react-native-xenon

Version:

A powerful in-app debugging tool for React Native.

23 lines (22 loc) 1.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _utils = require("../core/utils"); var _class; function _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; } let Interceptor = exports.default = (_class = class Interceptor { #isInterceptorEnabled = false; get isInterceptorEnabled() { return this.#isInterceptorEnabled; } set isInterceptorEnabled(value) { this.#isInterceptorEnabled = value; } set(key, handler) { this.handlers[key] ??= handler; return this; } }, _applyDecoratedDescriptor(_class.prototype, "set", [_utils.frozen], Object.getOwnPropertyDescriptor(_class.prototype, "set"), _class.prototype), _class); //# sourceMappingURL=Interceptor.js.map