regex-router
Advanced tools
Comparing version
@@ -0,1 +1,2 @@ | ||
/// <reference types="node" /> | ||
import { IncomingMessage, ServerResponse } from 'http'; | ||
@@ -2,0 +3,0 @@ /** |
@@ -0,1 +1,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var notFound = function (req, res) { | ||
@@ -5,3 +7,3 @@ res.statusCode = 404; | ||
}; | ||
var Router = (function () { | ||
var Router = /** @class */ (function () { | ||
function Router(defaultHandler, routes) { | ||
@@ -62,4 +64,3 @@ if (defaultHandler === void 0) { defaultHandler = notFound; } | ||
return Router; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
}()); | ||
exports.default = Router; | ||
@@ -66,0 +67,0 @@ /** |
{ | ||
"name": "regex-router", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"description": "Route http(s) requests via regular expressions", | ||
@@ -21,9 +21,13 @@ "keywords": [ | ||
"devDependencies": { | ||
"mocha": "*", | ||
"request": "*", | ||
"typescript": "next" | ||
"@types/mocha": "^2.2.44", | ||
"@types/request": "^2.0.13", | ||
"mocha": "^2.5.3", | ||
"request": "^2.79.0", | ||
"typescript": "^2.6.2" | ||
}, | ||
"scripts": { | ||
"test": "make test" | ||
"prepare": "tsc -d", | ||
"test": "mocha tests/", | ||
"clean": "tsc -d --listEmittedFiles | sed 's/^TSFILE: //' | xargs rm -v" | ||
} | ||
} |
# Regex-router | ||
[](https://www.npmjs.com/package/regex-router) | ||
Regex-router is a simple Node.js library to simplify web application routing without using a framework. | ||
@@ -4,0 +6,0 @@ |
6467
5%119
1.71%38
5.56%5
66.67%5
-16.67%