MCPcopy Create free account
hub / github.com/Effect-TS/tsgo / cloneJSON

Function cloneJSON

etscore/options_schema_test.go:293–303  ·  view source on GitHub ↗
(value T)

Source from the content-addressed store, hash-verified

291 }
292}
293
294func cloneProperties(properties map[string]any) map[string]any {
295 cloned := make(map[string]any, len(properties))
296 for key, value := range properties {
297 cloned[key] = value
298 }
299 return cloned
300}
301
302func cloneJSON[T any](value T) T {
303 data, err := json.Marshal(value)
304 if err != nil {
305 panic(err)
306 }

Callers 1

otherPluginSchemaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected