# remove-trailing-path-separator

> Remove trailing path separator from string.

Latest version **1.0.3** (published 2021-04-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install remove-trailing-path-separator
pnpm add remove-trailing-path-separator
yarn add remove-trailing-path-separator
bun add remove-trailing-path-separator
```

## 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.0.3 |
| Published | 2021-04-13 |
| First published | 2015-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | sanemat |
| Maintainers | sanemat |
| Keywords | backslash, path, sep, separator, slash, string, trailing, trim, win, windows |

## Links

- npm: https://www.npmjs.com/package/remove-trailing-path-separator
- Repository: https://github.com/pandawing/node-remove-trailing-path-separator
- Homepage: https://github.com/pandawing/node-remove-trailing-path-separator#readme
- Issues: https://github.com/pandawing/node-remove-trailing-path-separator/issues
- npm.io page: https://npm.io/package/remove-trailing-path-separator

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2021-04-13
- 1.0.2 — 2017-11-25
- 1.0.1 — 2015-07-21
- 1.0.0 — 2015-07-21

## README

# remove-trailing-path-separator

[![NPM version][npm-image]][npm-url] [![Travis-CI Status][travis-image]][travis-url] [![Appveyor Status][appveyor-image]][appveyor-url] [![Daviddm Status][daviddm-image]][daviddm-url]

> Remove trailing path separator from string.


## Install

```
$ npm install --save remove-trailing-path-separator
```


## Usage


```js
var removeTrailingPathSeparator = require('remove-trailing-path-separator');

removeTrailingPathSeparator('/foo/bar/baz/');
//=> /foo/bar/baz
removeTrailingPathSeparator('/foo/bar/baz//');
//=> /foo/bar/baz
removeTrailingPathSeparator('\\foo\\bar\\baz\\');
//=> \\foo\\bar\\baz
removeTrailingPathSeparator('\\foo\\bar\\baz\\\\');
//=> \\foo\\bar\\baz
```


## API

### removeTrailingPathSeparator(input) -> String

#### input

*Required*  
Type: `string`

Like path string.


## Changelog

[changelog.md](./changelog.md).


## License

MIT © [sanemat](http://sane.jp)


[travis-url]: https://travis-ci.org/pandawing/node-remove-trailing-path-separator
[travis-image]: https://img.shields.io/travis/pandawing/node-remove-trailing-path-separator/master.svg?style=flat-square&label=travis
[appveyor-url]: https://ci.appveyor.com/project/sanemat/node-remove-trailing-path-separator/branch/master
[appveyor-image]: https://img.shields.io/appveyor/ci/sanemat/node-remove-trailing-path-separator/master.svg?style=flat-square&label=appveyor
[npm-url]: https://npmjs.org/package/remove-trailing-path-separator
[npm-image]: https://img.shields.io/npm/v/remove-trailing-path-separator.svg?style=flat-square
[daviddm-url]: https://david-dm.org/pandawing/node-remove-trailing-path-separator
[daviddm-image]: https://img.shields.io/david/pandawing/node-remove-trailing-path-separator.svg?style=flat-square

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