express-redirect
Advanced tools
Comparing version 0.0.5-pre to 0.1.0-pre
// expose compile | ||
module.exports = compile; | ||
// compile a matching params and target | ||
// compile matching params and target | ||
function compile(params, target) { | ||
@@ -6,0 +6,0 @@ if(typeof target.elements == "string") return target.elements; |
@@ -0,1 +1,4 @@ | ||
// module dependencies | ||
var util = require("util"); | ||
// expose pecompiler | ||
@@ -2,0 +5,0 @@ module.exports = precompile; |
// module dependencies | ||
var util = require("util") | ||
, parsePath = require("./parsePath") | ||
var parsePath = require("./parsePath") | ||
, precompile = require("./precompile") | ||
@@ -11,4 +10,4 @@ , compile = require("./compile"); | ||
// mount the redirect method | ||
function plugin() { | ||
this.redirect = redirect; | ||
function plugin(app) { | ||
app.redirect = redirect; | ||
} | ||
@@ -23,4 +22,4 @@ | ||
this.all(route, function(req, res, next) { | ||
res.redirect(status, compile(req.params, target)); | ||
}); | ||
res.redirect(status, compile(req.params, target)); | ||
}); | ||
} |
{ | ||
"name": "express-redirect", | ||
"description": "Flexible redirection plugin", | ||
"version": "0.0.5-pre", | ||
"version": "0.1.0-pre", | ||
"author": "Jan Buschtöns <buschtoens@gmail.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8860
15
270
1