🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

remove-trailing-separator

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remove-trailing-separator

Removes separators from the end of the string.

1.1.0
latest
Version published
Weekly downloads
12M
-10.88%
Maintainers
1
Weekly downloads
 
Created

What is remove-trailing-separator?

The remove-trailing-separator npm package is a simple utility that helps in removing trailing separators from a given path string. This can be particularly useful in file path manipulations where consistency in path formatting is required.

What are remove-trailing-separator's main functionalities?

Remove trailing path separator

This feature allows the removal of trailing slashes (or other relevant separators) from a file path. It ensures that the path is normalized without an ending separator, which is useful for concatenating paths or when directories are compared.

const removeTrailingSeparator = require('remove-trailing-separator');
console.log(removeTrailingSeparator('example/path/')); // Outputs: 'example/path'

Other packages similar to remove-trailing-separator

FAQs

Package last updated on 16 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts