(name: string)
| 11 | * Scoped packages need special handling (@scope/name → @scope%2Fname) |
| 12 | */ |
| 13 | export function encodePackageName(name: string): string { |
| 14 | if (name.startsWith('@')) { |
| 15 | return `@${encodeURIComponent(name.slice(1))}` |
| 16 | } |
| 17 | return encodeURIComponent(name) |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Fetch the latest version of a package using fast-npm-meta API. |
no outgoing calls
no test coverage detected