Skip to content

Commit

Permalink
Expose sanitize function
Browse files Browse the repository at this point in the history
  • Loading branch information
fiznool committed Nov 11, 2015
1 parent ca8f673 commit 341a9fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var sanitize = function(val) {
return val;
};

module.exports = function() {
var middleware = function() {
return function(req, res, next) {
['body', 'params', 'query'].forEach(function(k) {
if(req[k]) {
Expand All @@ -27,3 +27,6 @@ module.exports = function() {
next();
};
};

module.exports = middleware;
module.exports.sanitize = sanitize;

0 comments on commit 341a9fa

Please sign in to comment.