MCPcopy Create free account
hub / github.com/nodejs/nodejs.org / normalizeSrc

Function normalizeSrc

apps/site/cloudflare/image-loader.ts:3–5  ·  view source on GitHub ↗
(src: string)

Source from the content-addressed store, hash-verified

1import type { ImageLoaderProps } from 'next/image';
2
3const normalizeSrc = (src: string) => {
4 return src.startsWith('/') ? src.slice(1) : src;
5};
6
7export default function cloudflareLoader({
8 src,

Callers 1

cloudflareLoaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected