MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / arrayToMapGeneric

Function arrayToMapGeneric

apps/web/services/slack/sync/attachments.ts:113–120  ·  view source on GitHub ↗
(key: string, val: string)

Source from the content-addressed store, hash-verified

111}
112
113function arrayToMapGeneric(key: string, val: string) {
114 return (prev: any, curr: any) => {
115 return {
116 ...prev,
117 [curr[key]]: curr[val],
118 };
119 };
120}
121
122const arrayToMap = arrayToMapGeneric('fileId', 'internalUrl');

Callers 1

attachments.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected