Removes the leading slash from the beginning of the segment (if it exists)
const segment = removeLeadingSlash('/example');console.log(segment); // 'example' Copy
const segment = removeLeadingSlash('/example');console.log(segment); // 'example'
Removes the leading slash from the beginning of the segment (if it exists)
Usage