# `NPM.Config.Npmrc.Merge`
[🔗](https://github.com/elixir-volt/npm_ex/blob/v0.7.4/lib/npm/config/npmrc/merge.ex#L1)

Multi-layer .npmrc resolution (project → user → global).

Merges configuration from multiple .npmrc files with proper precedence.

# `active_layers`

```elixir
@spec active_layers(String.t()) :: [%{path: String.t(), keys: [String.t()]}]
```

Returns which layers exist and contribute config.

# `layers`

```elixir
@spec layers(String.t()) :: [String.t()]
```

Returns the ordered list of .npmrc file paths (global → user → project).

# `read_layer`

```elixir
@spec read_layer(String.t()) :: map()
```

Reads and parses a single .npmrc file.

# `resolve`

```elixir
@spec resolve(String.t()) :: map()
```

Resolves merged configuration from all .npmrc layers.

Project-level overrides user-level, which overrides global.

# `trace`

```elixir
@spec trace(String.t(), String.t()) :: {:ok, String.t(), String.t()} | :not_found
```

Traces where a specific config key comes from.

---

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