From c97f947b358683272940ac13a5799ea892b0253e Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Sun, 29 Sep 2024 15:23:02 -0300 Subject: [PATCH] lib: tiny refactor format --- lib/clock.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/clock.js b/lib/clock.js index c1192d8..933d999 100644 --- a/lib/clock.js +++ b/lib/clock.js @@ -32,22 +32,18 @@ class Timer { validateNumber(timeInNs, 'timeInNs', 0); if (timeInNs > 1e9) { - return `${ (timeInNs / 1e9).toFixed(2) }s`; + return `${(timeInNs / 1e9).toFixed(2)}s`; } if (timeInNs > 1e6) { - return `${ (timeInNs / 1e6).toFixed(2) }ms`; + return `${(timeInNs / 1e6).toFixed(2)}ms`; } if (timeInNs > 1e3) { - return `${ (timeInNs / 1e3).toFixed(2) }us`; + return `${(timeInNs / 1e3).toFixed(2)}us`; } - if (timeInNs > 1e2) { - return `${ (timeInNs).toFixed(2) }ns`; - } - - return `${ (timeInNs).toFixed(2) }ns`; + return `${(timeInNs).toFixed(2)}ns`; } }