Package Exports
- strip-trailing-slashes
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (strip-trailing-slashes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Strip Trailing Slashes
A function that removes all slashes from the end of a string.
This function:
- makes no assumptions about the kind of slash (forward
/
or backward\
) - does not care what the current operating system or file system is
- does not care what the operating system or file system was for the string's source
- does not distinguish between file system path, a URL, or any other kind of string
If there is one or more slashes at the end of a string, they get removed.
That is all there is to it.
API
stripTrailingSlashes(text)
text
Type: String
The string of text you want to remove trailing slashes from. If this is not a string, it will throw a TypeError.