This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw-extensions/wecom/node_modules/@octokit/webhooks/dist-src/normalize-trailing-slashes.js
T

19 lines
292 B
JavaScript

function normalizeTrailingSlashes(path) {
let i = path.length;
if (i === 0) {
return "/";
}
while (i > 0) {
if (path.charCodeAt(--i) !== 47) {
break;
}
}
if (i === -1) {
return "/";
}
return path.slice(0, i + 1);
}
export {
normalizeTrailingSlashes
};