( url: string, )
| 40 | .trim(); |
| 41 | |
| 42 | const 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 | |
| 53 | const getDependencyName = (specifier: string): string => |
| 54 | specifier.startsWith('@') |
no outgoing calls
no test coverage detected
searching dependent graphs…