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

Function applyMorphAt

ark/aot/settingsValidators.ts:868–879  ·  view source on GitHub ↗
(ctx, checker, value, k)

Source from the content-addressed store, hash-verified

866 return holdingMorphs(t, held)
867}
868var applyMorphAt = (ctx, checker, value, k) => {
869 ctx.path.push(k)
870 const passes =
871 (
872 transformsValid(ctx) &&
873 (checker.a ? checker.a(value, ctx) : checker(value))
874 ) ?
875 (transformedInApply(ctx, transformedBy(checker, value, ctx)), true)
876 : checker(value, ctx)
877 ctx.path.pop()
878 return !passes
879}
880var units = (
881 values,
882 code = "discriminant",

Callers

nothing calls this directly

Calls 7

aMethod · 0.80
popMethod · 0.80
transformsValidFunction · 0.70
checkerFunction · 0.70
transformedInApplyFunction · 0.70
transformedByFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected