Comparing version
@@ -5,6 +5,6 @@ const Trouter = require('trouter') | ||
const status404 = { | ||
const STATUS_404 = { | ||
status: 404 | ||
} | ||
const status500 = { | ||
const STATUS_500 = { | ||
status: 500 | ||
@@ -16,3 +16,3 @@ } | ||
config.defaultRoute = () => { | ||
return new Response(null, status404) | ||
return new Response(null, STATUS_404) | ||
} | ||
@@ -22,3 +22,3 @@ } | ||
config.errorHandler = (err) => { | ||
return new Response(err.message, status500) | ||
return new Response(err.message, STATUS_500) | ||
} | ||
@@ -25,0 +25,0 @@ } |
{ | ||
"name": "0http-bun", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "0http for Bun", | ||
@@ -22,6 +22,9 @@ "main": "index.js", | ||
"index.js", | ||
"index.d.ts", | ||
"common.d.ts", | ||
"lib/" | ||
], | ||
"devDependencies": { | ||
"0http-bun": "^1.0.2", | ||
"0http-bun": "^1.0.3", | ||
"bun-types": "^1.1.8", | ||
"mitata": "^0.1.11" | ||
@@ -28,0 +31,0 @@ }, |
8270
28.46%9
50%115
53.33%3
50%