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

Method unshift

src/utils.ts:727–736  ·  view source on GitHub ↗

Insert at front of list

(value: T)

Source from the content-addressed store, hash-verified

725
726 /** Insert at front of list */
727 unshift(value: T) {
728 this.count += 1;
729 const newNode: ListNode<T> = {
730 next: this.head.next as ListNode<T>,
731 prev: this.head as HeadNode<T>,
732 value
733 };
734 this.head.next.prev = newNode;
735 this.head.next = newNode;
736 }
737
738 private remove(node: ListNode<T> | EmptyNode): T | null {
739 if (node === this.head || this.length === 0) {

Callers 15

jquery.jsFile · 0.80
ItFunction · 0.80
lFunction · 0.80
_createFunction · 0.80
deferred.jsFile · 0.80
testOperationFunction · 0.80
runForAllClientsMethod · 0.80
utils.test.tsFile · 0.80
releaseMethod · 0.80
getInt32Method · 0.80
readMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected