MCPcopy
hub / github.com/drizzle-team/drizzle-orm / onlySpecifiedKeys

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

2import { expect, type TaskContext } from class="st">'vitest';
3
4function onlySpecifiedKeys(obj: Record<string, any>, keys: string[]) {
5 return Object.fromEntries(Object.entries(obj).filter(([key]) => keys.includes(key)));
6}
7
8export function expectSchemaShape<T extends v.ObjectSchema<v.ObjectEntries, undefined>>(t: TaskContext, expected: T) {
9 return {

Callers 1

fromFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected