# `NPM.Registry.Scope`
[🔗](https://github.com/elixir-volt/npm_ex/blob/v0.7.4/lib/npm/registry/scope.ex#L1)

Resolve the registry URL for scoped packages.

npm supports per-scope registry configuration in `.npmrc`:

    @mycompany:registry=https://npm.mycompany.com/

This allows private packages under `@mycompany/*` to resolve
from a custom registry while other packages use the default.

# `all_scopes`

```elixir
@spec all_scopes() :: %{required(String.t()) =&gt; String.t()}
```

Get all configured scope registries from `.npmrc`.

Returns a map of `scope => registry_url`.

# `registry_for`

```elixir
@spec registry_for(String.t()) :: String.t()
```

Get the registry URL for a package name.

Checks `.npmrc` for scope-specific registry configuration,
falls back to the default registry.

# `scope`

```elixir
@spec scope(String.t()) :: String.t() | nil
```

Extract the scope from a scoped package name.

Returns `nil` for unscoped packages.

# `scoped?`

```elixir
@spec scoped?(String.t()) :: boolean()
```

Check if a package name is scoped.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
