Skip to content

Commit 341a9fa

Browse files
committed
Expose sanitize function
1 parent ca8f673 commit 341a9fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var sanitize = function(val) {
1717
return val;
1818
};
1919

20-
module.exports = function() {
20+
var middleware = function() {
2121
return function(req, res, next) {
2222
['body', 'params', 'query'].forEach(function(k) {
2323
if(req[k]) {
@@ -27,3 +27,6 @@ module.exports = function() {
2727
next();
2828
};
2929
};
30+
31+
module.exports = middleware;
32+
module.exports.sanitize = sanitize;

0 commit comments

Comments
 (0)