Function
isGUID
(annotations?: Annotations.Filter)
Source from the content-addressed store, hash-verified
| 7018 | * @since 4.0.0 |
| 7019 | */ |
| 7020 | export 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. |
Tested by
no test coverage detected