MCPcopy Index your code
hub / github.com/AnswerOverflow/AnswerOverflow / pick

Function pick

packages/utils/src/select.ts:5–11  ·  view source on GitHub ↗
(obj: T, ...keys: K[])

Source from the content-addressed store, hash-verified

3};
4
5export function pick<T, K extends keyof T>(obj: T, ...keys: K[]): Pick<T, K> {
6 const result = {} as Pick<T, K>;
7 keys.forEach((key) => {
8 result[key] = obj[key];
9 });
10 return result;
11}
12
13// https://stackoverflow.com/questions/53966509/typescript-type-safe-omit-function
14export const omit = <T extends object, K extends keyof T>(

Callers 2

select.test.tsFile · 0.90
makeMessageWithAuthorFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected