MCPcopy Create free account
hub / github.com/pmndrs/leva / get

Function get

packages/plugin-plot/src/plot-plugin.ts:28–31  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

26
27export const normalize = ({ expression, ..._settings }: PlotInput, _path: string, data: Data) => {
28 const get = (path: string) => {
29 if ('value' in data[path]) return data[path].value
30 return undefined // TODO should throw
31 }
32 const value = parseExpression(expression, get) as (v: number) => any
33 const settings = { ...defaultSettings, ..._settings }
34 return { value, settings: settings as InternalPlotSettings }

Callers 11

parseExpressionFunction · 0.85
public.test.tsFile · 0.85
RenderFunction · 0.85
onClickFunction · 0.85
ButtonFunction · 0.85
DisabledButtonFunction · 0.85
BoxFunction · 0.85
ControlsFunction · 0.85
ExtraControlsFunction · 0.85
ControlsFunction · 0.85
AppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected