Skip to content

Commit

Permalink
pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
herudi committed May 31, 2022
1 parent 695da90 commit c3369ef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Van Router

[![ci](https://github.com/herudi/van-router/workflows/ci/badge.svg)](https://github.com/herudi/van-router)
[![npm version](https://img.shields.io/badge/npm-0.6.4-blue.svg)](https://npmjs.org/package/van-router)
[![npm version](https://img.shields.io/badge/npm-0.6.5-blue.svg)](https://npmjs.org/package/van-router)
[![License](https://img.shields.io/:license-mit-blue.svg)](http://badges.mit-license.org)
[![download-url](https://img.shields.io/npm/dm/van-router.svg)](https://npmjs.org/package/van-router)
[![minzip](https://img.shields.io/bundlephobia/minzip/van-router)](https://github.com/herudi/van-router)
Expand Down Expand Up @@ -47,7 +47,7 @@ const { createRouter } = require("van-router");
### Deno

```ts
import { createRouter } from "https://deno.land/x/van_router@0.6.4/mod.ts";
import { createRouter } from "https://deno.land/x/van_router@0.6.5/mod.ts";
```

## Usage
Expand Down Expand Up @@ -530,7 +530,7 @@ http.createServer(async (request, response) => {
## With Deno (Server-Rendered)

```ts
import { createRouter } from "https://deno.land/x/van_router@0.6.4/mod.ts";
import { createRouter } from "https://deno.land/x/van_router@0.6.5/mod.ts";
import { serve } from "https://deno.land/std@0.140.0/http/server.ts";

const port = 8080;
Expand Down
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ class Router<Ctx extends Context = Context> {
if (el.regex && el.regex.test(url)) {
try {
url = decodeURI(url);
} catch (_e) { /* noop */ }
} catch (e) {
console.warn(e.message);
}
params = el.regex.exec(url).groups || {};
fns = el.fns;
path = el.path;
Expand Down
3 changes: 1 addition & 2 deletions scripts/build.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as esbuild from "https://deno.land/x/esbuild@v0.14.25/mod.js";

const VERSION = "0.6.4";
const VERSION = "0.6.5";

const dir = Deno.cwd();
const dir_npm = dir + "/npm";
Expand Down Expand Up @@ -45,7 +45,6 @@ try {
"description": "A small router middleware for vanillajs.",
"version": "${VERSION}",
"main": "index.node.js",
"browser": "index.min.js",
"unpkg": "index.min.js",
"module": "index.esm.js",
"types": "index.d.ts",
Expand Down

0 comments on commit c3369ef

Please sign in to comment.