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

Function unescapeToLinuxLikePath

packages/vite/src/node/utils.ts:836–844  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

834
835const revertWindowsDriveRE = /^\/windows\/([A-Z])\//
836function unescapeToLinuxLikePath(path: string) {
837 if (path.startsWith('/linux/')) {
838 return path.slice('/linux'.length)
839 }
840 if (path.startsWith('/windows/')) {
841 return path.replace(revertWindowsDriveRE, '$1:/')
842 }
843 return path
844}
845
846// based on https://github.com/sveltejs/svelte/blob/abf11bb02b2afbd3e4cac509a0f70e318c306364/src/compiler/utils/mapped_code.ts#L221
847const nullSourceMap: RawSourceMap = {

Callers 1

combineSourcemapsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected