Parses and manages npm package scopes.
Scopes are namespaces prefixed with @ (e.g., @babel/core).
They map to registries, organizations, and access controls.
Summary
Functions
Extracts the bare package name (without scope).
Extracts the scope from a package name (without @).
Constructs a full scoped name from scope and package name.
Groups package names by scope (nil for unscoped).
Checks if a package name is scoped.
Lists all unique scopes found in a set of package names.
Validates a full package name (scoped or unscoped).
Validates a scope name.
Functions
Extracts the bare package name (without scope).
Extracts the scope from a package name (without @).
Constructs a full scoped name from scope and package name.
Groups package names by scope (nil for unscoped).
Checks if a package name is scoped.
Lists all unique scopes found in a set of package names.
Validates a full package name (scoped or unscoped).
Validates a scope name.
Scopes must be lowercase, URL-safe, and not start with a dot or underscore.