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

Method push

src/utils.ts:708–717  ·  src/utils.ts::List.push

Insert at end of list

(value: T)

Source from the content-addressed store, hash-verified

706
707 /** Insert at end of list */
708 push(value: T) {
709 this.count += 1;
710 const newNode: ListNode<T> = {
711 next: this.head as HeadNode<T>,
712 prev: this.head.prev as ListNode<T>,
713 value
714 };
715 this.head.prev.next = newNode;
716 this.head.prev = newNode;
717 }
718
719 /** Inserts every item inside an iterable instead of the iterable itself */
720 pushMany(iterable: Iterable<T>) {

Callers 15

testListPushFunction · 0.95
pushManyMethod · 0.95
mainFunction · 0.45
collectTestsFunction · 0.45
diffFunction · 0.45
searchtools.jsFile · 0.45
jquery.jsFile · 0.45
seFunction · 0.45
ueFunction · 0.45
TeFunction · 0.45
CeFunction · 0.45
EeFunction · 0.45

Calls

no outgoing calls

Tested by 15

testMethod · 0.36
commitQuorumTestFunction · 0.36
setupFunction · 0.36
writeFunction · 0.36
initMethod · 0.36
makeChangeStreamMethod · 0.36
recordEventFunction · 0.36
findSortFunction · 0.36
cursorSortFunction · 0.36
testFunction · 0.36
pushToClientEventsFunction · 0.36
makeClientFunction · 0.36