Adds a trailing slash to the end of the segment (if it doesn't already exist)
const segment = addTrailingSlash('example');console.log(segment); // 'example/' Copy
const segment = addTrailingSlash('example');console.log(segment); // 'example/'
Adds a trailing slash to the end of the segment (if it doesn't already exist)
Usage