MCPcopy
hub / github.com/mongodb/node-mongodb-native / prune

Method prune

src/utils.ts:764–770  ·  view source on GitHub ↗

Iterates through the list and removes nodes where filter returns true

(filter: (value: T) => boolean)

Source from the content-addressed store, hash-verified

762
763 /** Iterates through the list and removes nodes where filter returns true */
764 prune(filter: (value: T) => boolean) {
765 for (const node of this.nodes()) {
766 if (filter(node.value)) {
767 this.remove(node);
768 }
769 }
770 }
771
772 clear() {
773 this.count = 0;

Callers 2

releaseMethod · 0.80
ensureMinPoolSizeMethod · 0.80

Calls 3

nodesMethod · 0.95
removeMethod · 0.95
filterFunction · 0.50

Tested by

no test coverage detected