# Function: displayName()

```ts
function displayName(did, profiles): string;
```

Defined in: [packages/core/src/space/names.ts:20](https://github.com/leifriksheim/minca/blob/main/core/src/space/names.ts#L20)

What to print for someone: their name, their name and the tail of their
identity when someone else in the space gave the same name, or only the
tail when they gave none. A name is whatever its owner typed, so two people
both called "Sam" must never look like one.

```ts
displayName(did, profiles)   // "Sam", "Sam · 4YtJb2", or "4YtJb2"
```

## Parameters

| Parameter | Type |
| ------ | ------ |
| `did` | `string` \| `null` \| `undefined` |
| `profiles` | `Iterable`\<[`SpaceProfile`](https://minca.dev/api/core/interfaces/SpaceProfile.md)\> |

## Returns

`string`
