MCPcopy Create free account
hub / github.com/axe-api/axe-api / uniqueByMap

Function uniqueByMap

packages/axe-api/src/Handlers/Helpers.ts:158–164  ·  view source on GitHub ↗
(array: T[])

Source from the content-addressed store, hash-verified

156};
157
158const uniqueByMap = <T>(array: T[]): T[] => {
159 const map = new Map();
160 for (const item of array) {
161 map.set(item, item);
162 }
163 return Array.from(map.values());
164};
165
166const serialize = (
167 data: any,

Callers 1

getRelatedDataFunction · 0.85

Calls 1

setMethod · 0.65

Tested by

no test coverage detected