MCPcopy
hub / github.com/vitejs/vite / processSrcSetSync

Function processSrcSetSync

packages/vite/src/node/utils.ts:810–820  ·  view source on GitHub ↗
(
  srcs: string,
  replacer: (arg: ImageCandidate) => string,
)

Source from the content-addressed store, hash-verified

808}
809
810export function processSrcSetSync(
811 srcs: string,
812 replacer: (arg: ImageCandidate) => string,
813): string {
814 return joinSrcset(
815 parseSrcset(srcs).map(({ url, descriptor }) => ({
816 url: replacer({ url, descriptor }),
817 descriptor,
818 })),
819 )
820}
821
822const windowsDriveRE = /^[A-Z]:/
823const replaceWindowsDriveRE = /^([A-Z]):\//

Callers 2

processNodeUrlFunction · 0.90
utils.spec.tsFile · 0.90

Calls 3

joinSrcsetFunction · 0.85
parseSrcsetFunction · 0.85
replacerFunction · 0.85

Tested by

no test coverage detected