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

Method remove

src/utils.ts:738–751  ·  view source on GitHub ↗
(node: ListNode<T> | EmptyNode)

Source from the content-addressed store, hash-verified

736 }
737
738 private remove(node: ListNode<T> | EmptyNode): T | null {
739 if (node === this.head || this.length === 0) {
740 return null;
741 }
742
743 this.count -= 1;
744
745 const prevNode = node.prev;
746 const nextNode = node.next;
747 prevNode.next = nextNode;
748 nextNode.prev = prevNode;
749
750 return node.value;
751 }
752
753 /** Removes the first node at the front of the list */
754 shift(): T | null {

Callers 15

shiftMethod · 0.95
popMethod · 0.95
pruneMethod · 0.95
jquery.jsFile · 0.80
LeFunction · 0.80
listenForCodeCopiesMethod · 0.80
ceFunction · 0.80
feFunction · 0.80
teFunction · 0.80
NeFunction · 0.80
deFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected