(annotations?: Annotations.Filter)
| 7071 | * @since 4.0.0 |
| 7072 | */ |
| 7073 | export function isULID(annotations?: Annotations.Filter) { |
| 7074 | const regExp = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/ |
| 7075 | return isPattern( |
| 7076 | regExp, |
| 7077 | { |
| 7078 | representation: { |
| 7079 | id: "effect/schema/isULID", |
| 7080 | payload: null |
| 7081 | }, |
| 7082 | toJsonSchema: () => ({ pattern: regExp.source }), |
| 7083 | toCode: () => ({ runtime: "Schema.isULID()" }), |
| 7084 | ...annotations |
| 7085 | } |
| 7086 | ) |
| 7087 | } |
| 7088 | |
| 7089 | /** |
| 7090 | * Reviver for persisted `isULID` checks. |