MCPcopy
hub / github.com/vitest-dev/vitest / splitFileAndPostfix

Function splitFileAndPostfix

packages/utils/src/helpers.ts:68–74  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

66}
67
68export function splitFileAndPostfix(path: string): {
69 file: string
70 postfix: string
71} {
72 const file = cleanUrl(path)
73 return { file, postfix: path.slice(file.length) }
74}
75
76const externalRE = /^(?:[a-z]+:)?\/\//
77export const isExternalUrl = (url: string): boolean => externalRE.test(url)

Callers 1

getModuleInformationMethod · 0.90

Calls 1

cleanUrlFunction · 0.70

Tested by

no test coverage detected