Package Exports
- super-trailing-slash
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 (super-trailing-slash) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Installation
Node.js
npm install super-trailing-slash --save
Example
Add trailing slash
const slash = require('super-trailing-slash');
slash.add('path/to/file'); //=> path/to/file/
slash.add('\\path\\to\\file'); //=> \path\to\file\
// Adds only if necessary
slash.add('path/to/file/'); //=> path/to/file/
Remove trailing slash
slash.remove('path/to/file/'); //=> path/to/file
slash.remove('\\path\\to\\file\\'); //=> \path\to\file
// Removes only if necessary
slash.remove('path/to/file'); //=> path/to/file
API
Changelog
You can view the changelog here
License
super-trailing-slash is open-sourced software licensed under the MIT license