MCPcopy
hub / github.com/vercel/hyper / keys

Function keys

lib/utils/object.ts:13–18  ·  view source on GitHub ↗
(imm: Record<string, any>)

Source from the content-addressed store, hash-verified

11
12const keysCache = new WeakMap();
13export function keys(imm: Record<string, any>) {
14 if (!keysCache.has(imm)) {
15 keysCache.set(imm, Object.keys(imm));
16 }
17 return keysCache.get(imm);
18}
19
20export const ObjectTypedKeys = <T extends object>(obj: T) => {
21 return Object.keys(obj) as (keyof T)[];

Callers 1

effectFunction · 0.90

Calls 3

hasMethod · 0.80
setMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected