Skip to content

Commit 695f185

Browse files
committed
Add JWT string format to README
1 parent e000014 commit 695f185

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [Date/Time strings](#datetime-strings)
1515
- [URI strings](#uri-strings)
1616
- [Email address strings](#email-address-strings)
17+
- [JWT Strings](#jwt-strings)
1718
- [Other formats](#other-formats)
1819
- [Object Formats](#object-formats)
1920
- [Firestore Timestamps](#firestore-timestamps)
@@ -243,6 +244,28 @@ The following table illustrates the results of different email strings
243244
| `"Example Name <[email protected]>"` | rfc5322 |
244245
| `"Example S. Name <[email protected]>"` | rfc5322 |
245246

247+
### JWT Strings
248+
249+
Strings that contain JWT tokens will have the `jwt` format
250+
251+
```javascript
252+
inferType(
253+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.sruoLZNJ59anK67z25t80L62OXDerSiAhWerW-usZLQ",
254+
);
255+
```
256+
257+
Will result in
258+
259+
```json
260+
{
261+
"name": "string",
262+
"value": "...",
263+
"format": {
264+
"name": "jwt"
265+
}
266+
}
267+
```
268+
246269
### Other formats
247270

248271
The following table illustrates the rest of the formats JSON Infer Types supports

0 commit comments

Comments
 (0)