MCPcopy Create free account
hub / github.com/arktypeio/arktype / get

Function get

ark/util/get.ts:23–31  ·  view source on GitHub ↗
(
	data: o,
	pathStr: conform<path, string & validatePath<o, path>>
)

Source from the content-addressed store, hash-verified

21 }[keyOf<o>]
22
23export const get = <const o extends object, path extends string>(
24 data: o,
25 pathStr: conform<path, string & validatePath<o, path>>
26): getPath<o, path> => {
27 let target: any = data
28 const path = pathStr.split(".")
29 while (path.length) target = target[path.shift()!]
30 return target
31}

Callers 9

stringOrNullMethod · 0.50
repositoryMapFunction · 0.50
scopeNameOrNullFunction · 0.50
stringFunction · 0.50
ruleMapFunction · 0.50
toRawRuleFunction · 0.50
readFunction · 0.50
standaloneOfFunction · 0.50
memoMethod · 0.50

Calls 1

shiftMethod · 0.80

Tested by

no test coverage detected