NET-Web-API-w-Angular/my-app/node_modules/pacote/lib/util/trailing-slashes.js

11 lines
238 B
JavaScript
Raw Normal View History

2024-02-09 00:38:41 +00:00
const removeTrailingSlashes = (input) => {
// in order to avoid regexp redos detection
let output = input
while (output.endsWith('/')) {
output = output.slice(0, -1)
}
return output
}
module.exports = removeTrailingSlashes