esmsh

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client holds configuration for esm.sh requests.

func New

func New() *Client

New creates a new esm.sh client.

func (*Client) FetchPackageFiles

func (c *Client) FetchPackageFiles(ctx context.Context, name, version string) (library.Files, string, error)

FetchPackageFiles retrieves package metadata from esm.sh. It calls the ?meta endpoint, then parses the returned JavaScript snippet to extract the version and the main export file URL. It returns a single file in the library.Files slice.

Jump to

Keyboard shortcuts

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