MCPcopy Create free account
hub / github.com/tinyplex/tinybase / getDependency

Function getDependency

site/ui/ExecutableProject.tsx:42–51  ·  view source on GitHub ↗
(
  url: string,
)

Source from the content-addressed store, hash-verified

40 .trim();
41
42const getDependency = (
43 url: string,
44): [dependency: string, version: string] | undefined => {
45 if (!url.startsWith(ESM_SH_PREFIX)) {
46 return;
47 }
48 const match =
49 url.match(ESM_SH_PACKAGE_REGEX) ?? url.match(ESM_SH_SUBPATH_REGEX);
50 return match == null ? undefined : [match[1], match[2]];
51};
52
53const getDependencyName = (specifier: string): string =>
54 specifier.startsWith('@')

Callers 1

getDependenciesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…