@jsenv/humanize 1.2.4 → 1.2.5

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.
@@ -683,7 +683,8 @@ const inspectStringObject = (value, {
683
683
  });
684
684
  };
685
685
 
686
- // primitives
686
+ // tslint:disable:ordered-imports
687
+
687
688
  const humanize = (value, {
688
689
  parenthesis = false,
689
690
  quote = "auto",
@@ -888,7 +888,8 @@ const inspectStringObject = (
888
888
  return inspectConstructor(`String(${stringSource})`, { useNew, parenthesis });
889
889
  };
890
890
 
891
- // primitives
891
+ // tslint:disable:ordered-imports
892
+
892
893
 
893
894
  const humanize = (
894
895
  value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/humanize",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Generate messages meant to read by humans",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -3,28 +3,28 @@ directory: /Users/damien.maillard/dev/perso/jsenv-core/packages/independent/huma
3
3
  ---------------------------------------------
4
4
  ✔ 01/23 _tests/byte/file_size.test.js [node/0.03s] (1 completed)
5
5
  ✔ 02/23 _tests/byte/memory.test.js [node/0.03s] (2 completed)
6
- ✔ 03/23 _tests/content_frame/content_frame.test.js [node/0.08s] (3 completed)
7
- ✔ 04/23 _tests/js_value/_inspect.test.html [chromium/0.5s] (4 completed)
6
+ ✔ 03/23 _tests/content_frame/content_frame.test.js [node/0.1s] (3 completed)
7
+ ✔ 04/23 _tests/js_value/_inspect.test.html [chromium/0.3s] (4 completed)
8
8
  ✔ 05/23 _tests/js_value/_inspect.test.html [firefox/0.2s] (5 completed)
9
9
  ✔ 06/23 _tests/js_value/_inspect.test.html [webkit/0.5s] (6 completed)
10
- ✔ 07/23 _tests/js_value/array.test.js [node/0.03s] (7 completed)
10
+ ✔ 07/23 _tests/js_value/array.test.js [node/0.04s] (7 completed)
11
11
  ✔ 08/23 _tests/js_value/biginit.test.js [node/0.03s] (8 completed)
12
- ✔ 09/23 _tests/js_value/boolean.test.js [node/0.06s] (9 completed)
13
- ✔ 10/23 _tests/js_value/date.test.js [node/0.06s] (10 completed)
14
- ✔ 11/23 _tests/js_value/error.test.js [node/0.05s] (11 completed)
15
- ✔ 12/23 _tests/js_value/function.test.js [node/0.07s] (12 completed)
16
- ✔ 13/23 _tests/js_value/instance.test.js [node/0.06s] (13 completed)
17
- ✔ 14/23 _tests/js_value/null.test.js [node/0.2s] (14 completed)
18
- ✔ 15/23 _tests/js_value/number.test.js [node/0.1s] (15 completed)
19
- ✔ 16/23 _tests/js_value/object.test.js [node/0.2s] (16 completed)
20
- ✔ 17/23 _tests/js_value/regexp.test.js [node/0.06s] (17 completed)
21
- ✔ 18/23 _tests/js_value/string.test.js [node/0.07s] (18 completed)
22
- ✔ 19/23 _tests/js_value/symbol.test.js [node/0.03s] (19 completed)
23
- ✔ 20/23 _tests/js_value/undefined.test.js [node/0.03s] (20 completed)
24
- ✔ 21/23 _tests/time/decimals.test.js [node/0.03s] (21 completed)
25
- ✔ 22/23 _tests/time/duration.test.js [node/0.03s] (22 completed)
12
+ ✔ 09/23 _tests/js_value/boolean.test.js [node/0.04s] (9 completed)
13
+ ✔ 10/23 _tests/js_value/date.test.js [node/0.03s] (10 completed)
14
+ ✔ 11/23 _tests/js_value/error.test.js [node/0.03s] (11 completed)
15
+ ✔ 12/23 _tests/js_value/function.test.js [node/0.03s] (12 completed)
16
+ ✔ 13/23 _tests/js_value/instance.test.js [node/0.03s] (13 completed)
17
+ ✔ 14/23 _tests/js_value/null.test.js [node/0.06s] (14 completed)
18
+ ✔ 15/23 _tests/js_value/number.test.js [node/0.05s] (15 completed)
19
+ ✔ 16/23 _tests/js_value/object.test.js [node/0.04s] (16 completed)
20
+ ✔ 17/23 _tests/js_value/regexp.test.js [node/0.04s] (17 completed)
21
+ ✔ 18/23 _tests/js_value/string.test.js [node/0.03s] (18 completed)
22
+ ✔ 19/23 _tests/js_value/symbol.test.js [node/0.02s] (19 completed)
23
+ ✔ 20/23 _tests/js_value/undefined.test.js [node/0.02s] (20 completed)
24
+ ✔ 21/23 _tests/time/decimals.test.js [node/0.02s] (21 completed)
25
+ ✔ 22/23 _tests/time/duration.test.js [node/0.02s] (22 completed)
26
26
  ✔ 23/23 _tests/time/ellapsed.test.js [node/0.02s] (all completed)
27
27
  ------------ 23 executions done -------------
28
28
  status: all completed
29
- duration: 2.6s (setup: 0.4s, execution: 2.5s, teardown: 0.2s)
29
+ duration: 2.4s (setup: 0.4s, execution: 2.3s, teardown: 0.2s)
30
30
  ---------------------------------------------
@@ -1,5 +1,5 @@
1
- import { writeFileSync } from "node:fs";
2
1
  import { takeFileSnapshot } from "@jsenv/snapshot";
2
+ import { writeFileSync } from "node:fs";
3
3
 
4
4
  import { generateContentFrame } from "@jsenv/humanize";
5
5
 
@@ -1,10 +1,10 @@
1
1
  import { assert } from "@jsenv/assert";
2
2
 
3
3
  import {
4
- setRoundedPrecision,
5
4
  setCeiledPrecision,
6
5
  setFlooredPrecision,
7
6
  setPrecision,
7
+ setRoundedPrecision,
8
8
  } from "@jsenv/humanize/src/utils/decimals.js";
9
9
 
10
10
  /* numbers between -1 and 1 */
@@ -1,3 +1,5 @@
1
+ // tslint:disable:ordered-imports
2
+
1
3
  // primitives
2
4
  import { inspectBoolean } from "./boolean.js";
3
5
  import { inspectNull } from "./null.js";
@@ -2,8 +2,8 @@
2
2
  * see also https://github.com/vadimdemedes/ink
3
3
  */
4
4
 
5
- import stringWidth from "string-width";
6
5
  import ansiEscapes from "ansi-escapes";
6
+ import stringWidth from "string-width";
7
7
 
8
8
  export const createDynamicLog = ({
9
9
  stream = process.stdout,
package/src/log/logger.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  LOG_LEVEL_DEBUG,
3
- LOG_LEVEL_INFO,
4
- LOG_LEVEL_WARN,
5
3
  LOG_LEVEL_ERROR,
4
+ LOG_LEVEL_INFO,
6
5
  LOG_LEVEL_OFF,
6
+ LOG_LEVEL_WARN,
7
7
  } from "./LOG_LEVELS.js";
8
8
 
9
9
  export const createLogger = ({ logLevel = LOG_LEVEL_INFO } = {}) => {
@@ -1,3 +1,5 @@
1
+ // tslint:disable:ordered-imports
2
+
1
3
  export { createDetailedMessage } from "./log/detailed_message.js";
2
4
  export { ANSI } from "./ansi/ansi_browser.js";
3
5
  export { UNICODE } from "./unicode/unicode_browser.js";
package/src/main_node.js CHANGED
@@ -1,3 +1,5 @@
1
+ // tslint:disable:ordered-imports
2
+
1
3
  export { createDetailedMessage } from "./log/detailed_message.js";
2
4
  export { ANSI } from "./ansi/ansi_node.js";
3
5
  export { UNICODE } from "./unicode/unicode_node.js";
@@ -1,5 +1,5 @@
1
- import { createUnicode } from "./unicode_runtime_agnostic.js";
2
1
  import { ANSI } from "../ansi/ansi_browser.js";
2
+ import { createUnicode } from "./unicode_runtime_agnostic.js";
3
3
 
4
4
  export const UNICODE = createUnicode({
5
5
  supported: true,
@@ -1,6 +1,6 @@
1
1
  import isUnicodeSupported from "is-unicode-supported";
2
- import { createUnicode } from "./unicode_runtime_agnostic.js";
3
2
  import { ANSI } from "../ansi/ansi_node.js";
3
+ import { createUnicode } from "./unicode_runtime_agnostic.js";
4
4
 
5
5
  export const UNICODE = createUnicode({
6
6
  supported: process.env.FORCE_UNICODE === "1" || isUnicodeSupported(),