(obj: T, keys: K[])
| 7 | import { SystemError, UserFacingError } from './error'; |
| 8 | |
| 9 | const 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 | |
| 15 | export default (logger, xff, xhost) => async (ctx: KoaContext, next: Next) => { |
| 16 | // Base Layer |
no outgoing calls
no test coverage detected