Function
getInstanceLabel
(name: string, index: number, ids: string[], id: string)
Source from the content-addressed store, hash-verified
| 23 | compact?: boolean |
| 24 | } |
| 25 | |
| 26 | function getInstanceLabel(name: string, index: number, ids: string[], id: string): string { |
| 27 | const totalForId = ids.filter(item => item === id).length |
| 28 | if (totalForId <= 1) return name |
| 29 | const instanceNumber = ids.slice(0, index + 1).filter(item => item === id).length |
| 30 | return `${name} #${instanceNumber}` |
| 31 | } |
| 32 | |
| 33 | function countCapabilities(capabilities: MemberPreset['capabilities']) { |
Tested by
no test coverage detected