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

Parses and manages package bin field entries.

The `bin` field in package.json maps command names to script files.
Supports both string shorthand and map formats.

# `all_bins`

```elixir
@spec all_bins(String.t()) :: %{required(String.t()) =&gt; String.t()}
```

Scans installed packages and collects all available binaries.

# `commands`

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

Lists all command names provided by a package.

# `count`

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

Counts the number of binaries a package provides.

# `extract`

```elixir
@spec extract(map()) :: %{required(String.t()) =&gt; String.t()}
```

Extracts bin entries from package.json data.

Returns a map of command name → script path.

# `has_bin?`

```elixir
@spec has_bin?(map()) :: boolean()
```

Checks if a package provides any binaries.

# `resolve`

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

Resolves the script path for a given command.

---

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