# no-slash

> express middleware to remove trailing slash

Latest version **1.2.15** (published 2017-05-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install no-slash
pnpm add no-slash
yarn add no-slash
bun add no-slash
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.15 |
| Published | 2017-05-31 |
| First published | 2017-04-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Brian Ruddy |
| Maintainers | bcruddy |

## Links

- npm: https://www.npmjs.com/package/no-slash
- Repository: https://github.com/bcruddy/no-slash
- Homepage: https://github.com/bcruddy/no-slash#readme
- Issues: https://github.com/bcruddy/no-slash/issues
- npm.io page: https://npm.io/package/no-slash

## Dependencies (1)

- [url](https://npm.io/package/url.md) ^0.11.0

## Recent versions

- 1.2.15 (latest) — 2017-05-31
- 1.2.14 — 2017-05-31
- 1.2.13 — 2017-05-31
- 1.2.12 — 2017-05-29
- 1.2.11 — 2017-05-29
- 1.2.10 — 2017-05-25
- 1.2.9 — 2017-05-18
- 1.2.8 — 2017-05-18
- 1.2.7 — 2017-05-10
- 1.2.6 — 2017-05-10
- 1.2.5 — 2017-05-10
- 1.2.4 — 2017-05-09
- 1.2.3 — 2017-05-09
- 1.2.2 — 2017-05-09
- 1.2.1 — 2017-05-09
- … 5 more at https://npm.io/package/no-slash/versions

## README

[![npm version](https://badge.fury.io/js/no-slash.svg)](https://badge.fury.io/js/no-slash)
[![Build Status](https://travis-ci.org/bcruddy/no-slash.svg?branch=master)](https://travis-ci.org/bcruddy/no-slash)

# 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`

```javascript
const express = require('express'),
    noSlash = require('no-slash'),
    app = express();

app.use(noSlash());
```

Or for node < 6

```javascript
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](https://facebook.github.io/jest/), 100% coverage is required
- Linting with [eslint](http://eslint.org/)
- TravisCI for deploy to npm

---
_Source: https://npm.io/package/no-slash · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
