We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c87c456 commit 42505caCopy full SHA for 42505ca
1 file changed
README.md
@@ -107,6 +107,17 @@ const ulid = monotonicFactory(() => Math.random());
107
ulid(); // 01BXAVRG61YJ5YSBRM51702F6M
108
```
109
110
+### Validity
111
+
112
+You can verify if a value is a valid ULID by using `isValid`:
113
114
+```typescript
115
+import { isValid } from "ulid";
116
117
+isValid("01ARYZ6S41TSV4RRFFQ69G5FAV"); // true
118
+isValid("01ARYZ6S41TSV4RRFFQ69G5FA"); // false
119
+```
120
121
### Tests
122
123
Install dependencies using `npm install` first, and then simply run `npm test` to run the test suite.
0 commit comments