MCPcopy Index your code
hub / github.com/freeCodeCamp/freeCodeCamp / mapKeyToFileKey

Function mapKeyToFileKey

client/src/utils/ajax.ts:146–150  ·  view source on GitHub ↗
(
  files: (K & { key: string })[]
)

Source from the content-addressed store, hash-verified

144}
145
146function mapKeyToFileKey<K>(
147 files: (K & { key: string })[]
148): (Omit<K, 'key'> & { fileKey: string })[] {
149 return files.map(({ key, ...rest }) => ({ ...rest, fileKey: key }));
150}
151
152export function getSessionUser(
153 signal?: AbortSignal

Callers 1

mapFilesToChallengeFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected