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

Determines and configures package installation strategy.

npm supports hoisted (default), nested, and isolated install strategies
configured via `.npmrc` or `--install-strategy` flag.

# `describe`

```elixir
@spec describe(atom()) :: String.t()
```

Describes a strategy.

# `detect`

```elixir
@spec detect(map()) :: atom()
```

Detects the install strategy from config.

# `max_depth`

```elixir
@spec max_depth(atom()) :: non_neg_integer() | :infinity
```

Returns the node_modules structure depth for a strategy.

# `recommend`

```elixir
@spec recommend(map()) :: atom()
```

Returns recommended strategy for a project configuration.

# `strategies`

```elixir
@spec strategies() :: [atom()]
```

Returns all supported strategies.

# `valid?`

```elixir
@spec valid?(atom()) :: boolean()
```

Checks if a strategy is valid.

---

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