MCPcopy
hub / github.com/subquery/subql / map

Method map

packages/node-core/src/utils/blockHeightMap.ts:105–113  ·  view source on GitHub ↗
(fn: (value: T) => T2)

Source from the content-addressed store, hash-verified

103 }
104
105 map<T2>(fn: (value: T) => T2): BlockHeightMap<T2> {
106 const newMap = new Map<number, T2>();
107
108 for (const [key, value] of this.#map) {
109 newMap.set(key, fn(value));
110 }
111
112 return new BlockHeightMap(newMap);
113 }
114}

Callers 15

sortJsonObjectPropertiesFunction · 0.80
setLevelMethod · 0.80
setDebugFilterMethod · 0.80
debugFilterMethod · 0.80
buildArgsFunction · 0.80
bindProjectionsFunction · 0.80
toVarDefsFunction · 0.80
buildQueryFunction · 0.80
getAllJsonObjectsFunction · 0.80
getAllEntitiesRelationsFunction · 0.80
getJoinIndexFieldsFunction · 0.80
findDuplicateStringArrayFunction · 0.80

Calls 1

setMethod · 0.65

Tested by 5

createMultichainProjectFunction · 0.64
mockProofOfIndexesFunction · 0.64
mockPoiRepoFunction · 0.64
transactionFunction · 0.64
validateFunction · 0.64