unmock-browser
Version:
Unmock for browser and React Native
17 lines • 632 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const unmock_fetch_1 = require("unmock-fetch");
const unmock_xmlhttprequest_1 = require("unmock-xmlhttprequest");
class BrowserInterecptor {
constructor(options) {
this.config = options;
unmock_fetch_1.default.on(this.config.onSerializedRequest);
unmock_xmlhttprequest_1.default.on(this.config.onSerializedRequest);
}
disable() {
unmock_fetch_1.default.off();
unmock_xmlhttprequest_1.default.off();
}
}
exports.BrowserInterecptor = BrowserInterecptor;
//# sourceMappingURL=browser-interceptor.js.map