MCPcopy Index your code
hub / github.com/freeCodeCamp/freeCodeCamp / trimTrailingSlash

Function trimTrailingSlash

api/src/plugins/auth-dev.ts:11–12  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

9import { createAccessToken } from '../utils/tokens.js';
10
11const trimTrailingSlash = (str: string) =>
12 str.endsWith('/') ? str.slice(0, -1) : str;
13
14async function handleRedirects(req: FastifyRequest, reply: FastifyReply) {
15 const params = getRedirectParams(req);

Callers 1

handleRedirectsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected