MCPcopy Index your code
hub / github.com/Effect-TS/effect / get

Function get

packages/platform/src/internal/keyValueStore.ts:129–136  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

127 const encode = Schema.encode(jsonSchema)
128
129 const get = (key: string) =>
130 Effect.flatMap(
131 store.get(key),
132 Option.match({
133 onNone: () => Effect.succeedNone,
134 onSome: (value) => Effect.asSome(parse(value))
135 })
136 )
137
138 const set = (key: string, value: A) => Effect.flatMap(encode(value), (json) => store.set(key, json))
139

Callers 1

modifyFunction · 0.70

Calls 2

parseFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected