Function
onlySpecifiedKeys
drizzle-valibot/tests/utils.ts:4–6
· drizzle-valibot/tests/utils.ts::onlySpecifiedKeys
(obj: Record<string, any>, keys: string[])
Source from the content-addressed store, hash-verified
| 2 | import { expect, type TaskContext } from class="st">'vitest'; |
| 3 | |
| 4 | function onlySpecifiedKeys(obj: Record<string, any>, keys: string[]) { |
| 5 | return Object.fromEntries(Object.entries(obj).filter(([key]) => keys.includes(key))); |
| 6 | } |
| 7 | |
| 8 | export function expectSchemaShape<T extends v.ObjectSchema<v.ObjectEntries, undefined>>(t: TaskContext, expected: T) { |
| 9 | return { |
Tested by
no test coverage detected