MCPcopy
hub / github.com/brianc/node-postgres / removeWhere

Function removeWhere

packages/pg-pool/index.js:6–10  ·  view source on GitHub ↗
(list, predicate)

Source from the content-addressed store, hash-verified

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

Callers 2

_removeMethod · 0.85
connectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected