remove-trailing-path-separator
v1.0.3
Published
Remove trailing path separator from string.
Downloads
60
Maintainers
Readme
remove-trailing-path-separator
Remove trailing path separator from string.
Install
$ npm install --save remove-trailing-path-separator
Usage
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
License
MIT © sanemat