MCPcopy
hub / github.com/RocketChat/Rocket.Chat / map

Method map

apps/meteor/client/meteor/minimongo/Cursor.ts:364–375  ·  view source on GitHub ↗
(
		callback: TIterationCallback,
		thisArg?: ThisParameterType<TIterationCallback>,
	)

Source from the content-addressed store, hash-verified

362 }
363
364 map<TIterationCallback extends (doc: DispatchTransform<TOptions['transform'], T>, index: number, cursor: this) => unknown>(
365 callback: TIterationCallback,
366 thisArg?: ThisParameterType<TIterationCallback>,
367 ): ReturnType<TIterationCallback>[] {
368 const result: ReturnType<TIterationCallback>[] = [];
369
370 this.forEach((doc, i) => {
371 result.push(callback.call(thisArg, doc, i, this) as ReturnType<TIterationCallback>);
372 });
373
374 return result;
375 }
376
377 observe(options: ObserveOptions<T>) {
378 return this._observeFromObserveChanges(options);

Callers 15

mapAsyncMethod · 0.95
getTimezoneNamesFunction · 0.45
objectMapFunction · 0.45
getLocalStreamIdsMethod · 0.45
buildDurationStringFunction · 0.45
DevicePickerFunction · 0.45
Keypad.spec.tsxFile · 0.45
KeypadFunction · 0.45
PeerInfo.spec.tsxFile · 0.45

Calls 3

forEachMethod · 0.95
callMethod · 0.65
pushMethod · 0.45

Tested by 11

getTestCasesFunction · 0.36
getTestVariationsFunction · 0.36
fillMessagesFunction · 0.36
resetTestDataFunction · 0.36
fillMessagesFunction · 0.36
createTokenFunction · 0.36
insertDefinitionsFunction · 0.36
insertUsersFunction · 0.36
configureStaticUsersFunction · 0.36
configureStaticUsersFunction · 0.36
insertRoomsFunction · 0.36