Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.18 KB

README.md

File metadata and controls

34 lines (25 loc) · 1.18 KB

npm version Build Status

express-url-cleaner

Express middleware for sanitizing urls with the sanitizer module

Usage

  • node 6+ recommended, for node < 6 an ES5 module is available at lib/es5.js
  • $ yarn add express-url-cleaner or $ npm install express-url-cleaner --save
const express = require('express'),
    urlCleaner = require('express-url-cleaner'),
    app = express();

app.use(urlCleaner());

or for node < 6

const express = require('express'),
    urlCleaner = require('express-url-cleaner/lib/es5'),
    app = express();

app.use(urlCleaner());

Contributing

Fork the repo and pull requests are always welcome. Please reference an issue in all pull requests, create one for the feature or bug if it doesn't exist yet.

Testing

  • Tests are run with jest and 100% coverage is required.
  • Linting with eslint.