MCPcopy Create free account
hub / github.com/bholmesdev/simplestack-store / getAtPath

Function getAtPath

src/index.ts:251–258  ·  view source on GitHub ↗
(state: S, path: readonly PropertyKey[])

Source from the content-addressed store, hash-verified

249 };
250
251 const getAtPath = (state: S, path: readonly PropertyKey[]) => {
252 let current: any = state;
253 for (const key of path) {
254 if (isStatePrimitive(current)) return undefined;
255 current = current[key as keyof typeof current];
256 }
257 return current as any;
258 };
259
260 const storeApi: Store<S> = {
261 get,

Callers 2

getInitialSelectedFunction · 0.85
getSelectedFunction · 0.85

Calls 1

isStatePrimitiveFunction · 0.85

Tested by

no test coverage detected