0.0.0-pre.16 • Published 4 months ago
kavi v0.0.0-pre.16
kavi
The easiest way to achieve typesafe APIs in SvelteKit. This is meant to be an easy, simple and lightweight alternative to tRPC-SvelteKit. Kavi handles both +page.server.ts
, +page.ts
and +page.svelte
files seamlessly.
Install
npm i kavi zod
Usage
// server
export const router = {
add: middleware.args(z.tuple([z.number(), z.number()])).call(([a, b]) => {
return a + b
}),
}
// client
await api.add([1, 2]).ok() // 3
Read more in the docs
0.0.0-pre.14
7 months ago
0.0.0-pre.13
8 months ago
0.0.0-pre.16
4 months ago
0.0.0-pre.15
7 months ago
0.0.0-pre.12
8 months ago
0.0.0-pre.11
10 months ago
0.0.0-pre.10
11 months ago
0.0.0-pre.9
11 months ago
0.0.0-pre.8
11 months ago
0.0.0-pre.7
12 months ago
0.0.0-pre.6
12 months ago
0.0.0-pre.5
12 months ago
0.0.0-pre.4
12 months ago
0.0.0-pre.3
12 months ago
0.0.0-pre.2
12 months ago
0.0.0-pre.1
12 months ago
0.1.0
2 years ago