# interfaceMatchScore

Canonical: https://docs.shumoku.dev/en/library/api/interfaceMatchScore
Language: en

@shumoku/core · 0.4.0 · function

# interfaceMatchScore

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/observation/interface-name.ts#L119)

Score how well two normalized interface names match (0–1): same canonical prefix, then port numbers compared right-to-left (rightmost = most specific).

```
interfaceMatchScore(a: NormalizedInterface, b: NormalizedInterface): number
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `a` | `NormalizedInterface` | No additional description. | `—` |
| `b` | `NormalizedInterface` | No additional description. | `—` |

## Returns

```
number
```

[`libs/@shumoku/core/src/observation/interface-name.ts:119`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/observation/interface-name.ts#L119)
