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

Function copyConfig

ark/schema/shared/configured.ts:22–29  ·  view source on GitHub ↗
(config: config)

Source from the content-addressed store, hash-verified

20 * arktype reads one by identity, and so is any other instance, like a Date
21 */
22export const copyConfig = <config extends object>(config: config): config => {
23 const copy: Record<string, unknown> = {}
24 for (const k in config) {
25 const v = config[k]
26 copy[k] = k === "locale" ? v : copyPlain(v)
27 }
28 return copy as never
29}
30
31/**
32 * whether a config changes nothing of what's applied, as when a test runner

Callers 2

configureSchemaFunction · 0.90
configureFunction · 0.90

Calls 1

copyPlainFunction · 0.85

Tested by

no test coverage detected