MCPcopy Create free account
hub / github.com/Effect-TS/effect / isGUID

Function isGUID

packages/effect/src/Schema.ts:7020–7034  ·  view source on GitHub ↗
(annotations?: Annotations.Filter)

Source from the content-addressed store, hash-verified

7018 * @since 4.0.0
7019 */
7020export function isGUID(annotations?: Annotations.Filter) {
7021 return isPattern(
7022 GUID_REGEXP,
7023 {
7024 expected: "a GUID",
7025 representation: {
7026 id: "effect/schema/isGUID",
7027 payload: null
7028 },
7029 toJsonSchema: () => ({ pattern: GUID_REGEXP.source }),
7030 toCode: () => ({ runtime: "Schema.isGUID()" }),
7031 ...annotations
7032 }
7033 )
7034}
7035
7036/**
7037 * Reviver for persisted `isGUID` checks.

Callers 1

Schema.tsFile · 0.85

Calls 1

isPatternFunction · 0.70

Tested by

no test coverage detected