3.0.3 • Published 2 years ago
@jmondi/route-strings v3.0.3
@jmondi/route-strings
A typed route string generator to help keep urls under control.
Install
pnpm add @jmondi/route-strings
Deno
import { route } from "https://deno.land/x/route_strings/mod.ts";
Usage
import { Route } from "@jmondi/route-strings";
const r = route("/posts/:slug");
r.template;
// /posts/:slug
const r = route("/posts/:slug/random/:id");
r.create({ slug: "hello", id: 5 });
// /posts/hello/random/5
const g = routeGroup({ prefix: "/api/v1" });
const route = g.add("/posts/:slug/random/:id");
route.template;
// /api/v1/posts/:slug/random/:id
route.create({ slug: "hello", id: 5 });
// /api/v1/posts/hello/random/5
3.0.3
2 years ago
3.0.2
2 years ago
3.0.0
2 years ago
3.0.0-alpha.1
2 years ago
2.0.0-rc.1
3 years ago
2.0.0
3 years ago
1.3.2
3 years ago
1.3.1
3 years ago
1.3.0
3 years ago
1.2.0
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
4 years ago
1.0.0-rc.2
4 years ago
1.0.0-rc.1
4 years ago
1.0.0-rc.0
4 years ago