valibot-schema-ksuid
Version:
Valibot schema for K-Sortable Unique IDentifiers (KSUID)
35 lines (23 loc) • 1.29 kB
Markdown
# valibot-schema-ksuid
> Valibot schema for [K-Sortable Unique IDentifiers](https://github.com/segmentio/ksuid).
[](https://github.com/idleberg/valibot-schemas/blob/main/LICENSE)
[](https://www.npmjs.org/package/valibot-schema-ksuid)
[](https://jsr.io/@idleberg/valibot-schema-ksuid)
[](https://github.com/idleberg/valibot-schemas/actions/workflows/node.yml)
> [!NOTE]
> This libray isn't as lightweight as most built-in Valibot schemas, so it might not be suitable for some use-cases.
## Installation
```shell
# NodeJS
npm install valibot-schema-ksuid
# Deno
deno add jsr:@idleberg/valibot-schema-ksuid
```
## Usage
```javascript
import { parse } from "valibot";
import { ksuid } from "valibot-schema-ksuid";
const output = parse(ksuid(), "aWgEPTl1tmebfsQzFP4bxwgy80V");
```
## License
This work is licensed under [The MIT License](LICENSE).