(buckets: ExperienceBucket[])
| 51 | } |
| 52 | |
| 53 | const computeFeatureUsage = (buckets: ExperienceBucket[]) => { |
| 54 | const neverHeardCount = buckets.find(bucket => bucket.id === 'never_heard')?.count ?? 0 |
| 55 | const knowAboutCount = buckets.find(bucket => bucket.id === 'heard')?.count ?? 0 |
| 56 | const usageCount = buckets.find(bucket => bucket.id === 'used')?.count ?? 0 |
| 57 | |
| 58 | const total = usageCount + neverHeardCount + knowAboutCount |
| 59 | |
| 60 | return ratioToPercentage(usageCount / total) |
| 61 | } |
| 62 | |
| 63 | const computeInterest = (buckets: ExperienceBucket[]) => { |
| 64 | const interested = buckets.find(bucket => bucket.id === 'interested') |
no test coverage detected