New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

no-slash

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

no-slash

express middleware to remove trailing slash

  • 1.2.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

npm version Build Status

no-slash

Express middleware for forcing no trailing url slash via redirect. Defaults to a 301, status code can be passed as an argument.

Usage

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

app.use(noSlash());

Or for node < 6

var express = require('express'),
    noSlash = require('no-slash/lib/es5'),
    app = express();

app.use(noSlash());

Contributing

Feel free to fork and submit a PR. Please reference an issue in your PR to simplify tracking them (create one if it doesn't exist, feature or bug).

  • node v8, npm v5
  • Tests are run with jest, 100% coverage is required
  • Linting with eslint
  • TravisCI for deploy to npm

FAQs

Package last updated on 31 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc