MCPcopy Index your code
hub / github.com/hydro-dev/Hydro / pick

Function pick

framework/framework/base.ts:9–13  ·  view source on GitHub ↗
(obj: T, keys: K[])

Source from the content-addressed store, hash-verified

7import { SystemError, UserFacingError } from './error';
8
9const pick = <T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K> => {
10 const result: Partial<Pick<T, K>> = {};
11 for (const key of keys) result[key] = obj[key];
12 return result as Pick<T, K>;
13};
14
15export default (logger, xff, xhost) => async (ctx: KoaContext, next: Next) => {
16 // Base Layer

Callers 15

addTestdataMethod · 0.85
addAdditionalFileMethod · 0.85
deleteUserCacheFunction · 0.85
privateMethod · 0.85
serializeMethod · 0.85
resetMethod · 0.85
postUploadFileMethod · 0.85
_prepareMethod · 0.85
postUploadFileMethod · 0.85
getMethod · 0.85
postUploadFileMethod · 0.85
tsdocAsPublicMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected