MCPcopy Index your code
hub / github.com/markmap/markmap / resolveDepPath

Function resolveDepPath

packages/markmap-cli/src/fetch-assets.ts:42–53  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

40 ...extractAssets(toolbarAssets),
41 ];
42 const resolveDepPath = (path: string) => {
43 const parts = path.split('/');
44 const offset = parts[0].startsWith('@') ? 1 : 0;
45 parts[offset] = parts[offset].split('@')[0];
46 path = parts.join('/');
47 if (path.startsWith('d3')) {
48 path = 'markmap-view/node_modules/' + path;
49 } else if (!path.startsWith('markmap-')) {
50 path = 'markmap-lib/node_modules/' + path;
51 }
52 return resolve('..', path);
53 };
54 await Promise.all(
55 paths.map(async (path) => {
56 const fullPath = resolve(assetsDir, path);

Callers 1

fetchAssetsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected