NPM.Repository (NPM v0.6.0)

Copy Markdown View Source

Repository field parsing and URL generation from package.json.

Summary

Functions

Returns the browse URL (human-readable web URL).

Returns the HTTPS clone URL.

Extracts repository info from package.json data.

Checks if repository info is present.

Detects the hosting provider.

Functions

browse_url(data)

@spec browse_url(map()) :: String.t() | nil

Returns the browse URL (human-readable web URL).

clone_url(data)

@spec clone_url(map()) :: String.t() | nil

Returns the HTTPS clone URL.

extract(arg1)

@spec extract(map()) :: map() | nil

Extracts repository info from package.json data.

has_repository?(data)

@spec has_repository?(map()) :: boolean()

Checks if repository info is present.

provider(data)

@spec provider(map()) :: atom() | nil

Detects the hosting provider.