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

Software Bill of Materials (SBOM) generation.

Generates CycloneDX-compatible SBOM data from the lockfile,
listing all dependencies with versions, licenses, and integrity hashes.

# `component_count`

```elixir
@spec component_count(map()) :: non_neg_integer()
```

Returns the count of components in the SBOM.

# `filter`

```elixir
@spec filter(map(), (map() -&gt; boolean())) :: map()
```

Filters SBOM components by a predicate.

# `from_lockfile`

```elixir
@spec from_lockfile(map()) :: map()
```

Generates a minimal SBOM from lockfile only (no filesystem access).

# `generate`

```elixir
@spec generate(map(), String.t()) :: map()
```

Generates an SBOM from the lockfile and node_modules.

# `purl`

```elixir
@spec purl(String.t(), String.t()) :: String.t()
```

Generates a Package URL (purl) for an npm package.

---

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