"use strict";
|
function InterceptorManager() {
|
this.handlers = [];
|
}
|
InterceptorManager.prototype.use = function use(fulfilled, rejected) {
|
this.handlers.push({
|
fulfilled,
|
rejected
|
});
|
return this.handlers.length - 1;
|
};
|
InterceptorManager.prototype.eject = function eject(id) {
|
if (this.handlers[id]) {
|
this.handlers[id] = null;
|
}
|
};
|
InterceptorManager.prototype.forEach = function forEach(fn) {
|
this.handlers.forEach((h) => {
|
if (h !== null) {
|
fn(h);
|
}
|
});
|
};
|
exports.InterceptorManager = InterceptorManager;
|
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/InterceptorManager.js.map
|