Skip to content

Commit 162c4de

Browse files
author
progfay
committed
feat: highlight results
1 parent 631d331 commit 162c4de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/showStreak.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import chalk from 'chalk'
12
import type { StreakStrategyType } from './type'
23

34
export const showStreak = (contributions: Map<string, number>, streakStrategy: StreakStrategyType): void => {
45
const { from, to, count } = streakStrategy(contributions)
56
if (from && to && count > 0) {
6-
console.log(`${from.toString()} ~ ${to.toString()} (${count} ${count === 1 ? 'days' : 'day'})`)
7+
console.log(`${chalk.green(from.toString())} ~ ${chalk.green(to.toString())} (${chalk.green.bold(count)} ${count > 1 ? 'days' : 'day'})`)
78
} else {
89
console.log('No streak...')
910
}

0 commit comments

Comments
 (0)