(list, predicate)
| 4 | const NOOP = function () {} |
| 5 | |
| 6 | const removeWhere = (list, predicate) => { |
| 7 | const i = list.findIndex(predicate) |
| 8 | |
| 9 | return i === -1 ? undefined : list.splice(i, 1)[0] |
| 10 | } |
| 11 | |
| 12 | class IdleItem { |
| 13 | constructor(client, idleListener, timeoutId) { |