Skip to content

Commit a02740e

Browse files
committed
chore: bundle
1 parent 7a9fd7a commit a02740e

3 files changed

Lines changed: 72 additions & 17 deletions

File tree

dist/index.js

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/helpers/duration.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import * as handlebars from 'handlebars'
22

33
export function formatDurationHumanReadableHelper(): void {
4-
handlebars.registerHelper(
5-
'formatDurationHumanReadable',
6-
(durationMs: number) => {
7-
if (durationMs < 1) {
8-
return `1ms`
9-
} else if (durationMs < 1000) {
10-
return `${Math.floor(durationMs)}ms`
11-
} else if (durationMs < 60000) {
12-
return `${(durationMs / 1000).toFixed(1)}s`
13-
} else {
14-
const minutes = Math.floor(durationMs / 60000)
15-
const seconds = Math.floor((durationMs % 60000) / 1000)
16-
return `${minutes}m${seconds}s`
17-
}
18-
}
19-
)
4+
handlebars.registerHelper(
5+
'formatDurationHumanReadable',
6+
(durationMs: number) => {
7+
if (durationMs < 1) {
8+
return `1ms`
9+
} else if (durationMs < 1000) {
10+
return `${Math.floor(durationMs)}ms`
11+
} else if (durationMs < 60000) {
12+
return `${(durationMs / 1000).toFixed(1)}s`
13+
} else {
14+
const minutes = Math.floor(durationMs / 60000)
15+
const seconds = Math.floor((durationMs % 60000) / 1000)
16+
return `${minutes}m${seconds}s`
17+
}
18+
}
19+
)
2020
}

0 commit comments

Comments
 (0)