UNPKG

cdn-resolve

Version:

Resolves import paths to their CDN equivalents

20 lines (18 loc) 524 B
interface ParsedPackage { name: string; version: string; path?: string; scope?: string; full: string; } /** * Parses a package string and returns the parsed package information. * @param {string} pkg The package string to parse. * @returns The parsed package information. * @throws Error if the package name is invalid. * * NOTE: * The version is always set to "latest" if not specified. */ declare function parsePackage(pkg: string): ParsedPackage; export { type ParsedPackage, parsePackage };