denohelper

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 8 Imported by: 0

Documentation

Overview

Package denohelper provides common functionality for Deno extractors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNPMNameAndVersion

func CheckNPMNameAndVersion(name, version string) (string, bool)

CheckNPMNameAndVersion checks if the NPM Package name is not empty and the version is a valid semver constraint.

func ParseHTTPSURL

func ParseHTTPSURL(specifier string) *extractor.Package

ParseHTTPSURL parses HTTPS URLs and extracts package information from various CDN hosts.

func ParseImportSpecifier

func ParseImportSpecifier(specifier string) *extractor.Package

ParseImportSpecifier parses an import specifier and returns a Package if it's valid. Handles npm:, jsr:, and https:// prefixed imports.

func ParseJSRNameAndVersion

func ParseJSRNameAndVersion(specifier string) (name, version string)

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

func ParseNPMNameAndVersion(specifier string) (name, version string)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL