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

Implements npm shrinkwrap lockfile freezing.

Creates a `npm-shrinkwrap.json` that locks the entire dependency tree,
including transitive dependencies. Unlike `package-lock.json`, shrinkwrap
files are published with the package.

# `create`

```elixir
@spec create(String.t()) :: :ok | {:error, term()}
```

Creates a shrinkwrap file from the current lockfile.

# `exists?`

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

Checks if a shrinkwrap file exists.

# `outdated?`

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

Checks if the shrinkwrap is outdated compared to the lockfile.

# `read`

```elixir
@spec read(String.t()) :: {:ok, map()} | {:error, term()}
```

Reads and parses the shrinkwrap file.

# `remove`

```elixir
@spec remove(String.t()) :: :ok | {:error, term()}
```

Removes the shrinkwrap file.

# `verify`

```elixir
@spec verify(map(), map()) :: [mismatch()]
```

Verifies that installed packages match the shrinkwrap exactly.
Returns a list of mismatches.

---

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