# bpsToLinkWidthMode

Canonical: https://docs.shumoku.dev/ja/library/api/bpsToLinkWidthMode
Language: ja

@shumoku/core · 0.4.0 · function

# bpsToLinkWidthMode

[ソース](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/link-utils.ts#L153)

APIの説明は英語のcanonical sourceを表示しています。

Map bits/sec to stroke width under the given mode. Unknown bandwidth returns 0 (caller decides the fallback), matching \`bpsToLinkWidth\`.

```
bpsToLinkWidthMode(bps: number | undefined, mode?: LinkWidthMode): number
```

## パラメーター

| 名前 | 型 | 説明 | 既定値 |
| --- | --- | --- | --- |
| `bps` | `number | undefined` | 追加説明はありません。 | `—` |
| `mode` | `LinkWidthMode` | 追加説明はありません。 | `'log'` |

## 戻り値

```
number
```

[`libs/@shumoku/core/src/layout/link-utils.ts:153`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/link-utils.ts#L153)
