@naturalcycles/js-lib 15.30.0 → 15.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,10 +34,10 @@ export function _ms(millis) {
34
34
  // <1 sec
35
35
  if (millis < 1000)
36
36
  return `${Math.round(millis)} ms`;
37
- // < 5 sec
38
- if (millis < 5000) {
37
+ // < 10 sec
38
+ if (millis < 10_000) {
39
39
  const s = millis / 1000;
40
- return `${Math.trunc(s) === s ? s : s.toFixed(3)} sec`;
40
+ return `${s.toFixed(2)} sec`;
41
41
  }
42
42
  const sec = Math.floor(millis / 1000) % 60;
43
43
  const min = Math.floor(millis / (60 * 1000)) % 60;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
3
  "type": "module",
4
- "version": "15.30.0",
4
+ "version": "15.30.1",
5
5
  "dependencies": {
6
6
  "tslib": "^2",
7
7
  "undici": "^7",
@@ -41,10 +41,10 @@ export function _ms(millis: NumberOfMilliseconds): string {
41
41
  // <1 sec
42
42
  if (millis < 1000) return `${Math.round(millis)} ms`
43
43
 
44
- // < 5 sec
45
- if (millis < 5000) {
44
+ // < 10 sec
45
+ if (millis < 10_000) {
46
46
  const s = millis / 1000
47
- return `${Math.trunc(s) === s ? s : s.toFixed(3)} sec`
47
+ return `${s.toFixed(2)} sec`
48
48
  }
49
49
 
50
50
  const sec = Math.floor(millis / 1000) % 60