NPM.PublishConfig (NPM v0.6.0)

Copy Markdown View Source

Parses the publishConfig field from package.json.

Controls behavior when npm publish is called — registry, access level, tag, etc.

Summary

Functions

Returns the access level (public or restricted).

Checks if publishConfig is set.

Extracts publishConfig from package.json data.

Formats publishConfig for display.

Checks if the package would be published as public.

Returns the publish registry URL.

Returns the publish tag (default: "latest").

Functions

access(data)

@spec access(map()) :: String.t()

Returns the access level (public or restricted).

configured?(data)

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

Checks if publishConfig is set.

extract(arg1)

@spec extract(map()) :: map()

Extracts publishConfig from package.json data.

format(data)

@spec format(map()) :: String.t()

Formats publishConfig for display.

public?(data)

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

Checks if the package would be published as public.

registry(data)

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

Returns the publish registry URL.

tag(data)

@spec tag(map()) :: String.t()

Returns the publish tag (default: "latest").