MCPcopy Index your code
hub / github.com/primer/react / get

Function get

packages/react/src/DataTable/useTable.ts:333–342  ·  view source on GitHub ↗
(
  object: ObjectType,
  path: Path,
)

Source from the content-addressed store, hash-verified

331
332// eslint-disable-next-line @typescript-eslint/no-explicit-any
333function get<ObjectType extends Record<string, any>, Path extends string>(
334 object: ObjectType,
335 path: Path,
336): ObjectPathValue<ObjectType, Path> {
337 return path.split('.').reduce<ObjectPathValue<ObjectType, Path>>((value, key) => {
338 // eslint-disable-next-line @typescript-eslint/no-explicit-any
339 return (value as any)[key]
340 // eslint-disable-next-line @typescript-eslint/no-explicit-any
341 }, object as any)
342}

Callers 2

sortRowsFunction · 0.70
getValueFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected