Skip to content

Commit 183fd8d

Browse files
committed
Merge branch 'main' of https://github.com/nuxtify-dev/core
2 parents 1f130e1 + 4892842 commit 183fd8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/utils/math.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
export function toPercentage(val: number, decimals = 0) {
1+
export function toPercentage(val: number, decimals = 0): string {
22
const percentage = (val * 100).toFixed(decimals)
33
return `${percentage}%`
44
}
55

6-
export function roundToFixed(val: number | string, positions = 2) {
6+
export function roundToFixed(val: number | string, positions = 2): number {
77
let text = 0
88
if (typeof val === 'string') {
99
text = +Number.parseFloat(val).toFixed(positions)

0 commit comments

Comments
 (0)