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

Function splitUser

api/src/routes/helpers/user-utils.ts:57–61  ·  view source on GitHub ↗
(
  user: U
)

Source from the content-addressed store, hash-verified

55 * @returns A tuple where the first element is an object with nullable flags and the second element is an object with the remaining properties.
56 */
57export function splitUser<U extends Record<NullableFlags, unknown>>(
58 user: U
59): [Pick<U, NullableFlags>, Omit<U, NullableFlags>] {
60 return [pick(user, nullableFlags), omit(user, nullableFlags)];
61}

Callers 2

userPublicGetRoutesFunction · 0.85
getSessionUserHandlerFunction · 0.85

Calls 1

omitFunction · 0.85

Tested by

no test coverage detected