UNPKG

@codelet/core

Version:
14 lines (13 loc) 323 B
export class InterceptorManner { constructor() { } handlers = []; use(fulfilled, rejected) { const length = this.handlers.push({ fulfilled, rejected }); return length - 1; } eject(index) { if (this.handlers[index]) { this.handlers.splice(index, 1); } } }