Documentation
¶
Overview ¶
Package denohelper provides common functionality for Deno extractors.
Index ¶
- func CheckNPMNameAndVersion(name, version string) (string, bool)
- func ParseHTTPSURL(specifier string) *extractor.Package
- func ParseImportSpecifier(specifier string) *extractor.Package
- func ParseJSRNameAndVersion(specifier string) (name, version string)
- func ParseNPMNameAndVersion(specifier string) (name, version string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckNPMNameAndVersion ¶
CheckNPMNameAndVersion checks if the NPM Package name is not empty and the version is a valid semver constraint.
func ParseHTTPSURL ¶
ParseHTTPSURL parses HTTPS URLs and extracts package information from various CDN hosts.
func ParseImportSpecifier ¶
ParseImportSpecifier parses an import specifier and returns a Package if it's valid. Handles npm:, jsr:, and https:// prefixed imports.
func ParseJSRNameAndVersion ¶
ParseJSRNameAndVersion parses the name and version from a JSR package specifier. Handles both regular packages and scoped packages (e.g., "@std/path@^1").
func ParseNPMNameAndVersion ¶
ParseNPMNameAndVersion parses the name and version from a npm package specifier. Handles both regular packages (e.g., "chalk@1") and scoped packages (e.g., "@types/node@14"). Removes paths after the version (e.g., "chalk@1.0.0/dist/index.js"). Trims the char "v" before the version
Types ¶
This section is empty.