MCPcopy Create free account
hub / github.com/EndBug/version-check / trimTrailingSlashFromUrl

Function trimTrailingSlashFromUrl

src/main.ts:397–400  ·  view source on GitHub ↗
(rawUrl)

Source from the content-addressed store, hash-verified

395}
396
397function trimTrailingSlashFromUrl(rawUrl) {
398 const url = rawUrl.trim()
399 return url.endsWith('/') ? url.slice(0, -1) : url
400}
401
402async function getCommit(sha: string): Promise<CommitResponse> {
403 const githubApiUrl = trimTrailingSlashFromUrl(getInput('github-api-url'))

Callers 1

getCommitFunction · 0.70

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected