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

Detects phantom (undeclared) dependencies.

A phantom dependency is one that can be required in code but is not
declared in package.json — it only works because another package
depends on it and it gets hoisted.

# `count`

```elixir
@spec count(map(), map()) :: non_neg_integer()
```

Counts phantom dependencies.

# `detect`

```elixir
@spec detect(map(), map()) :: [String.t()]
```

Finds packages in node_modules that aren't declared in package.json.

# `format_report`

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

Formats a report of phantom dependencies.

# `phantom?`

```elixir
@spec phantom?(String.t(), map()) :: boolean()
```

Checks if a specific package is a phantom dependency.

---

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