MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / relativePathToRequest

Function relativePathToRequest

packages/webpack/src/AlphaTabWebPackPlugin.ts:22–33  ·  view source on GitHub ↗
(relativePath: string)

Source from the content-addressed store, hash-verified

20const WINDOWS_PATH_SEPARATOR_REGEXP = /\\/g;
21
22const relativePathToRequest = (relativePath: string): string => {
23 if (relativePath === '') {
24 return './.';
25 }
26 if (relativePath === '..') {
27 return '../.';
28 }
29 if (relativePath.startsWith('../')) {
30 return relativePath;
31 }
32 return `./${relativePath}`;
33};
34
35const absoluteToRequest = (context: string, maybeAbsolutePath: string): string => {
36 if (maybeAbsolutePath[0] === '/') {

Callers 1

absoluteToRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected