@decaf-ts/logging 0.10.0 → 0.10.2

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.
Files changed (100) hide show
  1. package/README.md +298 -171
  2. package/dist/logging.cjs +1 -1
  3. package/dist/logging.cjs.map +1 -1
  4. package/dist/logging.js +1 -1
  5. package/dist/logging.js.map +1 -1
  6. package/lib/LoggedClass.cjs +4 -4
  7. package/lib/LoggedClass.d.ts +4 -4
  8. package/lib/constants.cjs +32 -63
  9. package/lib/constants.d.ts +32 -63
  10. package/lib/constants.js.map +1 -1
  11. package/lib/decorators.cjs +28 -28
  12. package/lib/decorators.d.ts +29 -36
  13. package/lib/decorators.js.map +1 -1
  14. package/lib/environment.cjs +34 -41
  15. package/lib/environment.d.ts +31 -32
  16. package/lib/environment.js.map +1 -1
  17. package/lib/esm/LoggedClass.d.ts +4 -4
  18. package/lib/esm/LoggedClass.js +4 -4
  19. package/lib/esm/constants.d.ts +32 -63
  20. package/lib/esm/constants.js +32 -63
  21. package/lib/esm/constants.js.map +1 -1
  22. package/lib/esm/decorators.d.ts +29 -36
  23. package/lib/esm/decorators.js +28 -28
  24. package/lib/esm/decorators.js.map +1 -1
  25. package/lib/esm/environment.d.ts +31 -32
  26. package/lib/esm/environment.js +34 -41
  27. package/lib/esm/environment.js.map +1 -1
  28. package/lib/esm/filters/LogFilter.d.ts +11 -11
  29. package/lib/esm/filters/LogFilter.js +5 -5
  30. package/lib/esm/filters/PatternFilter.d.ts +15 -15
  31. package/lib/esm/filters/PatternFilter.js +12 -12
  32. package/lib/esm/index.d.ts +2 -2
  33. package/lib/esm/index.js +3 -3
  34. package/lib/esm/logging.d.ts +119 -113
  35. package/lib/esm/logging.js +223 -138
  36. package/lib/esm/logging.js.map +1 -1
  37. package/lib/esm/pino/index.d.ts +6 -0
  38. package/lib/esm/pino/index.js +6 -0
  39. package/lib/esm/pino/index.js.map +1 -1
  40. package/lib/esm/pino/pino.d.ts +13 -5
  41. package/lib/esm/pino/pino.js +70 -124
  42. package/lib/esm/pino/pino.js.map +1 -1
  43. package/lib/esm/text.d.ts +29 -67
  44. package/lib/esm/text.js +29 -67
  45. package/lib/esm/text.js.map +1 -1
  46. package/lib/esm/time.d.ts +45 -43
  47. package/lib/esm/time.js +38 -36
  48. package/lib/esm/time.js.map +1 -1
  49. package/lib/esm/types.d.ts +59 -50
  50. package/lib/esm/utils.d.ts +43 -0
  51. package/lib/esm/utils.js +55 -3
  52. package/lib/esm/utils.js.map +1 -1
  53. package/lib/esm/web.d.ts +2 -2
  54. package/lib/esm/web.js +2 -2
  55. package/lib/esm/winston/index.d.ts +7 -0
  56. package/lib/esm/winston/index.js +7 -1
  57. package/lib/esm/winston/index.js.map +1 -1
  58. package/lib/esm/winston/winston.d.ts +17 -21
  59. package/lib/esm/winston/winston.js +29 -36
  60. package/lib/esm/winston/winston.js.map +1 -1
  61. package/lib/filters/LogFilter.cjs +5 -5
  62. package/lib/filters/LogFilter.d.ts +11 -11
  63. package/lib/filters/PatternFilter.cjs +12 -12
  64. package/lib/filters/PatternFilter.d.ts +15 -15
  65. package/lib/index.cjs +3 -3
  66. package/lib/index.d.ts +2 -2
  67. package/lib/logging.cjs +224 -139
  68. package/lib/logging.d.ts +119 -113
  69. package/lib/logging.js.map +1 -1
  70. package/lib/pino/index.cjs +6 -0
  71. package/lib/pino/index.d.ts +6 -0
  72. package/lib/pino/index.js.map +1 -1
  73. package/lib/pino/pino.cjs +102 -126
  74. package/lib/pino/pino.d.ts +13 -5
  75. package/lib/pino/pino.js.map +1 -1
  76. package/lib/text.cjs +29 -67
  77. package/lib/text.d.ts +29 -67
  78. package/lib/text.js.map +1 -1
  79. package/lib/time.cjs +38 -36
  80. package/lib/time.d.ts +45 -43
  81. package/lib/time.js.map +1 -1
  82. package/lib/types.d.ts +59 -50
  83. package/lib/utils.cjs +55 -3
  84. package/lib/utils.d.ts +43 -0
  85. package/lib/utils.js.map +1 -1
  86. package/lib/web.cjs +2 -2
  87. package/lib/web.d.ts +2 -2
  88. package/lib/winston/index.cjs +22 -0
  89. package/lib/winston/index.d.ts +7 -0
  90. package/lib/winston/index.js.map +1 -1
  91. package/lib/winston/winston.cjs +29 -36
  92. package/lib/winston/winston.d.ts +17 -21
  93. package/lib/winston/winston.js.map +1 -1
  94. package/package.json +9 -10
  95. package/lib/accumulate.types.cjs +0 -27
  96. package/lib/accumulate.types.d.ts +0 -1
  97. package/lib/accumulate.types.js.map +0 -1
  98. package/lib/esm/accumulate.types.d.ts +0 -1
  99. package/lib/esm/accumulate.types.js +0 -25
  100. package/lib/esm/accumulate.types.js.map +0 -1
package/lib/esm/text.js CHANGED
@@ -1,17 +1,13 @@
1
1
  import { DefaultPlaceholderWrappers } from "./constants.js";
2
2
  /**
3
3
  * @description Pads the end of a string with a specified character.
4
- * @summary Extends the input string to a specified length by adding a padding character to the end.
5
- * If the input string is already longer than the specified length, it is returned unchanged.
6
- *
4
+ * @summary This function extends the input string to a specified length by adding a padding character to the end. If the input string is already longer than the specified length, it is returned unchanged.
7
5
  * @param {string} str - The input string to be padded.
8
6
  * @param {number} length - The desired total length of the resulting string.
9
- * @param {string} [char=" "] - The character to use for padding. Defaults to a space.
7
+ * @param {string} [char=" "] - The character to use for padding.
10
8
  * @return {string} The padded string.
11
9
  * @throws {Error} If the padding character is not exactly one character long.
12
- *
13
10
  * @function padEnd
14
- *
15
11
  * @memberOf module:Logging
16
12
  */
17
13
  export function padEnd(str, length, char = " ") {
@@ -20,20 +16,15 @@ export function padEnd(str, length, char = " ") {
20
16
  return str.padEnd(length, char);
21
17
  }
22
18
  /**
23
- * @description Replaces placeholders in a string with provided values.
24
- * @summary Interpolates a string by replacing placeholders of the form ${variableName}
25
- * with corresponding values from the provided object. If a placeholder doesn't have
26
- * a corresponding value, it is left unchanged in the string.
27
- *
28
- * @param {string} input - The input string containing placeholders to be replaced.
29
- * @param {Record<string, number | string>} values - An object containing key-value pairs for replacement.
30
- * @param prefix
31
- * @param suffix
32
- * @param flags
33
- * @return {string} The interpolated string with placeholders replaced by their corresponding values.
34
- *
19
+ * @description Replaces placeholders in a string with the provided values.
20
+ * @summary This function interpolates a string by replacing placeholders of the form `${variableName}` with the corresponding values from the provided object. If a placeholder does not have a corresponding value, it is left unchanged in the string.
21
+ * @param {string} input - The input string containing the placeholders to be replaced.
22
+ * @param {Record<string, (number|string)>} values - An object containing key-value pairs for the replacement.
23
+ * @param {string} [prefix="${"] - The prefix for the placeholders.
24
+ * @param {string} [suffix="}"] - The suffix for the placeholders.
25
+ * @param {string} [flags="g"] - The regular expression flags to use.
26
+ * @return {string} The interpolated string with the placeholders replaced by their corresponding values.
35
27
  * @function patchPlaceholders
36
- *
37
28
  * @mermaid
38
29
  * sequenceDiagram
39
30
  * participant Caller
@@ -43,7 +34,6 @@ export function padEnd(str, length, char = " ") {
43
34
  * patchString->>String.replace: Call with regex and replacement function
44
35
  * String.replace->>patchString: Return replaced string
45
36
  * patchString-->>Caller: Return patched string
46
- *
47
37
  * @memberOf module:Logging
48
38
  */
49
39
  export function patchPlaceholders(input, values, prefix = DefaultPlaceholderWrappers[0], suffix = DefaultPlaceholderWrappers[1], flags = "g") {
@@ -55,16 +45,12 @@ export function patchPlaceholders(input, values, prefix = DefaultPlaceholderWrap
55
45
  }
56
46
  /**
57
47
  * @description Replaces occurrences of keys with their corresponding values in a string.
58
- * @summary Iterates through a set of key-value pairs and replaces all occurrences of each key
59
- * in the input string with its corresponding value. Supports regular expression flags for customized replacement.
60
- *
61
- * @param {string} input - The input string in which replacements will be made.
62
- * @param {Record<string, number | string>} values - An object containing key-value pairs for replacement.
63
- * @param {string} [flags="g"] - Regular expression flags to control the replacement behavior.
64
- * @return {string} The string with all specified replacements applied.
65
- *
48
+ * @summary This function iterates through a set of key-value pairs and replaces all occurrences of each key in the input string with its corresponding value. It supports regular expression flags for customized replacement.
49
+ * @param {string} input - The input string in which the replacements will be made.
50
+ * @param {Record<string, (number|string)>} values - An object containing key-value pairs for the replacement.
51
+ * @param {string} [flags="g"] - The regular expression flags to control the replacement behavior.
52
+ * @return {string} The string with all the specified replacements applied.
66
53
  * @function patchString
67
- *
68
54
  * @memberOf module:Logging
69
55
  */
70
56
  export function patchString(input, values, flags = "g") {
@@ -76,14 +62,10 @@ export function patchString(input, values, flags = "g") {
76
62
  }
77
63
  /**
78
64
  * @description Converts a string to camelCase.
79
- * @summary Transforms the input string into camelCase format, where words are joined without spaces
80
- * and each word after the first starts with a capital letter.
81
- *
65
+ * @summary This function transforms the input string into camelCase format, where words are joined without spaces and each word after the first starts with a capital letter.
82
66
  * @param {string} text - The input string to be converted.
83
67
  * @return {string} The input string converted to camelCase.
84
- *
85
68
  * @function toCamelCase
86
- *
87
69
  * @memberOf module:Logging
88
70
  */
89
71
  export function toCamelCase(text) {
@@ -93,14 +75,10 @@ export function toCamelCase(text) {
93
75
  }
94
76
  /**
95
77
  * @description Converts a string to ENVIRONMENT_VARIABLE format.
96
- * @summary Transforms the input string into uppercase with words separated by underscores,
97
- * typically used for environment variable names.
98
- *
78
+ * @summary This function transforms the input string into uppercase with words separated by underscores, which is a format that is typically used for environment variable names.
99
79
  * @param {string} text - The input string to be converted.
100
80
  * @return {string} The input string converted to ENVIRONMENT_VARIABLE format.
101
- *
102
81
  * @function toENVFormat
103
- *
104
82
  * @memberOf module:Logging
105
83
  */
106
84
  export function toENVFormat(text) {
@@ -108,13 +86,10 @@ export function toENVFormat(text) {
108
86
  }
109
87
  /**
110
88
  * @description Converts a string to snake_case.
111
- * @summary Transforms the input string into lowercase with words separated by underscores.
112
- *
89
+ * @summary This function transforms the input string into lowercase with words separated by underscores.
113
90
  * @param {string} text - The input string to be converted.
114
91
  * @return {string} The input string converted to snake_case.
115
- *
116
92
  * @function toSnakeCase
117
- *
118
93
  * @memberOf module:Logging
119
94
  */
120
95
  export function toSnakeCase(text) {
@@ -125,13 +100,10 @@ export function toSnakeCase(text) {
125
100
  }
126
101
  /**
127
102
  * @description Converts a string to kebab-case.
128
- * @summary Transforms the input string into lowercase with words separated by hyphens.
129
- *
103
+ * @summary This function transforms the input string into lowercase with words separated by hyphens.
130
104
  * @param {string} text - The input string to be converted.
131
105
  * @return {string} The input string converted to kebab-case.
132
- *
133
106
  * @function toKebabCase
134
- *
135
107
  * @memberOf module:Logging
136
108
  */
137
109
  export function toKebabCase(text) {
@@ -142,14 +114,10 @@ export function toKebabCase(text) {
142
114
  }
143
115
  /**
144
116
  * @description Converts a string to PascalCase.
145
- * @summary Transforms the input string into PascalCase format, where words are joined without spaces
146
- * and each word starts with a capital letter.
147
- *
117
+ * @summary This function transforms the input string into PascalCase format, where words are joined without spaces and each word starts with a capital letter.
148
118
  * @param {string} text - The input string to be converted.
149
119
  * @return {string} The input string converted to PascalCase.
150
- *
151
120
  * @function toPascalCase
152
- *
153
121
  * @memberOf module:Logging
154
122
  */
155
123
  export function toPascalCase(text) {
@@ -159,26 +127,21 @@ export function toPascalCase(text) {
159
127
  }
160
128
  /**
161
129
  * @description Escapes special characters in a string for use in a regular expression.
162
- * @summary Adds backslashes before characters that have special meaning in regular expressions,
163
- * allowing the string to be used as a literal match in a RegExp.
164
- *
130
+ * @summary This function adds backslashes before characters that have a special meaning in regular expressions, which allows the string to be used as a literal match in a RegExp.
165
131
  * @param {string} string - The string to escape for regular expression use.
166
- * @return {string} The escaped string safe for use in regular expressions.
167
- *
132
+ * @return {string} The escaped string that is safe for use in regular expressions.
168
133
  * @function escapeRegExp
169
- *
170
134
  * @memberOf module:Logging
171
135
  */
172
136
  export function escapeRegExp(string) {
173
137
  return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
174
138
  }
175
139
  /**
176
- * @summary Util function to provide string format functionality similar to C#'s string.format
177
- *
178
- * @param {string} string
179
- * @param {Array<string | number> | Record<string, any>} [args] replacements made by order of appearance (replacement0 wil replace {0} and so on)
180
- * @return {string} formatted string
181
- *
140
+ * @description A utility function that provides string formatting functionality that is similar to C#'s string.format.
141
+ * @summary This function replaces placeholders in a string with the provided arguments.
142
+ * @param {string} string - The string to format.
143
+ * @param {...(string|number|Record<string, any>)} args - The arguments to use for formatting.
144
+ * @return {string} The formatted string.
182
145
  * @function sf
183
146
  * @memberOf module:Logging
184
147
  */
@@ -202,10 +165,9 @@ export function sf(string, ...args) {
202
165
  });
203
166
  }
204
167
  /**
205
- * @summary Util function to provide string format functionality similar to C#'s string.format
206
- *
168
+ * @description A utility function that provides string formatting functionality that is similar to C#'s string.format.
169
+ * @summary This function is deprecated. Use {@link sf} instead.
207
170
  * @see sf
208
- *
209
171
  * @deprecated
210
172
  * @function stringFormat
211
173
  * @memberOf module:Logging
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,uBAAoB;AAEzD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,MAAM,CACpB,GAAW,EACX,MAAc,EACd,OAAe,GAAG;IAElB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,OAAO,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAa,EACb,MAAuC,EACvC,SAAiB,0BAA0B,CAAC,CAAC,CAAC,EAC9C,SAAiB,0BAA0B,CAAC,CAAC,CAAC,EAC9C,QAAgB,GAAG;IAEnB,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAChD,CAAC,GAAwB,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE;QACvC,GAAG,CAAC,GAAG,MAAM,GAAG,GAAG,GAAG,MAAM,EAAE,CAAC,GAAG,GAAG,CAAC;QACtC,OAAO,GAAG,CAAC;IACb,CAAC,EACD,EAAE,CACH,CAA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ED,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE,MAAM;QACvD,OAAO,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,WAAW;YACxC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;YACzB,CAAC,CAAC,WAAW,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC"}
package/lib/esm/time.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @description Snapshot of a recorded lap interval.
3
- * @summary Captures the lap index, optional label, elapsed milliseconds for the lap, and cumulative elapsed time since the stopwatch started.
4
- * @typedef {Object} Lap
5
- * @property {number} index - Zero-based lap order.
6
- * @property {string} [label] - Optional label describing the lap.
7
- * @property {number} ms - Duration of the lap in milliseconds.
8
- * @property {number} totalMs - Total elapsed time when the lap was recorded.
2
+ * @description A snapshot of a recorded lap interval.
3
+ * @summary This captures the lap index, an optional label, the elapsed milliseconds for the lap, and the cumulative elapsed time since the stopwatch started.
4
+ * @typedef {object} Lap
5
+ * @property {number} index - The zero-based lap order.
6
+ * @property {string} [label] - An optional label that describes the lap.
7
+ * @property {number} ms - The duration of the lap in milliseconds.
8
+ * @property {number} totalMs - The total elapsed time when the lap was recorded.
9
9
  * @memberOf module:Logging
10
10
  */
11
11
  export type Lap = {
@@ -18,15 +18,17 @@ export type Lap = {
18
18
  };
19
19
  type NowFn = () => number;
20
20
  /**
21
- * @description High-resolution clock accessor returning milliseconds.
22
- * @summary Chooses the most precise timer available in the current runtime, preferring `performance.now` or `process.hrtime.bigint`.
23
- * @return {number} Milliseconds elapsed according to the best available clock.
21
+ * @description A high-resolution clock accessor that returns milliseconds.
22
+ * @summary This function chooses the most precise timer available in the current runtime, preferring `performance.now` or `process.hrtime.bigint`.
23
+ * @return {number} The milliseconds that have elapsed, according to the best available clock.
24
+ * @function now
25
+ * @memberOf module:Logging
24
26
  */
25
27
  export declare const now: NowFn;
26
28
  /**
27
- * @description High-resolution stopwatch with pause, resume, and lap tracking.
28
- * @summary Tracks elapsed time using the highest precision timer available, supports pausing, resuming, and recording labeled laps for diagnostics and benchmarking.
29
- * @param {boolean} [autoStart=false] - When true, the stopwatch starts immediately upon construction.
29
+ * @description A high-resolution stopwatch with pause, resume, and lap tracking.
30
+ * @summary This class tracks elapsed time using the highest precision timer available. It supports pausing, resuming, and recording labeled laps for diagnostics and benchmarking.
31
+ * @param {boolean} [autoStart=false] - When `true`, the stopwatch starts immediately upon construction.
30
32
  * @class StopWatch
31
33
  * @example
32
34
  * const sw = new StopWatch(true);
@@ -59,69 +61,69 @@ export declare class StopWatch {
59
61
  constructor(autoStart?: boolean);
60
62
  /**
61
63
  * @description Indicates whether the stopwatch is actively running.
62
- * @summary Returns `true` when timing is in progress and `false` when paused or stopped.
63
- * @return {boolean} Current running state.
64
+ * @summary This method returns `true` when timing is in progress, and `false` when it is paused or stopped.
65
+ * @return {boolean} The current running state.
64
66
  */
65
67
  get running(): boolean;
66
68
  /**
67
- * @description Elapsed time captured by the stopwatch.
68
- * @summary Computes the total elapsed time in milliseconds, including the current session if running.
69
- * @return {number} Milliseconds elapsed since the stopwatch started.
69
+ * @description The elapsed time that has been captured by the stopwatch.
70
+ * @summary This method computes the total elapsed time in milliseconds, including the current session if it is running.
71
+ * @return {number} The milliseconds that have elapsed since the stopwatch started.
70
72
  */
71
73
  get elapsedMs(): number;
72
74
  /**
73
75
  * @description Starts timing if the stopwatch is not already running.
74
- * @summary Records the current timestamp and transitions the stopwatch into the running state.
75
- * @return {this} Fluent reference to the stopwatch.
76
+ * @summary This method records the current timestamp and transitions the stopwatch into the running state.
77
+ * @return {this} A fluent reference to the stopwatch.
76
78
  */
77
79
  start(): this;
78
80
  /**
79
- * @description Pauses timing and accumulates elapsed milliseconds.
80
- * @summary Captures the partial duration, updates the accumulator, and keeps the stopwatch ready to resume later.
81
- * @return {this} Fluent reference to the stopwatch.
81
+ * @description Pauses timing and accumulates the elapsed milliseconds.
82
+ * @summary This method captures the partial duration, updates the accumulator, and keeps the stopwatch ready to resume later.
83
+ * @return {this} A fluent reference to the stopwatch.
82
84
  */
83
85
  pause(): this;
84
86
  /**
85
87
  * @description Resumes timing after a pause.
86
- * @summary Captures a fresh start timestamp while keeping previous elapsed time intact.
87
- * @return {this} Fluent reference to the stopwatch.
88
+ * @summary This method captures a fresh start timestamp, while keeping the previous elapsed time intact.
89
+ * @return {this} A fluent reference to the stopwatch.
88
90
  */
89
91
  resume(): this;
90
92
  /**
91
93
  * @description Stops timing and returns the total elapsed milliseconds.
92
- * @summary Invokes {@link StopWatch.pause} to consolidate elapsed time, leaving the stopwatch in a non-running state.
93
- * @return {number} Milliseconds accumulated across all runs.
94
+ * @summary This method invokes {@link StopWatch.pause} to consolidate the elapsed time, and leaves the stopwatch in a non-running state.
95
+ * @return {number} The milliseconds that have accumulated across all runs.
94
96
  */
95
97
  stop(): number;
96
98
  /**
97
- * @description Resets the stopwatch state while optionally continuing to run.
98
- * @summary Clears elapsed time and lap history, preserving whether the stopwatch should continue ticking.
99
- * @return {this} Fluent reference to the stopwatch.
99
+ * @description Resets the stopwatch state, while optionally continuing to run.
100
+ * @summary This method clears the elapsed time and lap history, and preserves whether the stopwatch should continue ticking.
101
+ * @return {this} A fluent reference to the stopwatch.
100
102
  */
101
103
  reset(): this;
102
104
  /**
103
- * @description Records a lap split since the stopwatch started or since the previous lap.
104
- * @summary Stores the lap metadata, updates cumulative tracking, and returns the newly created {@link Lap}.
105
- * @param {string} [label] - Optional label describing the lap.
106
- * @return {Lap} Lap snapshot capturing incremental and cumulative timings.
105
+ * @description Records a lap split since the stopwatch started, or since the previous lap.
106
+ * @summary This method stores the lap metadata, updates the cumulative tracking, and returns the newly created {@link Lap}.
107
+ * @param {string} [label] - An optional label that describes the lap.
108
+ * @return {Lap} A lap snapshot that captures incremental and cumulative timings.
107
109
  */
108
110
  lap(label?: string): Lap;
109
111
  /**
110
112
  * @description Retrieves the recorded lap history.
111
- * @summary Returns the internal lap array as a read-only view to prevent external mutation.
112
- * @return {Lap[]} Laps captured by the stopwatch.
113
+ * @summary This method returns the internal lap array as a read-only view to prevent external mutation.
114
+ * @return {Array<Lap>} The laps that have been captured by the stopwatch.
113
115
  */
114
116
  get laps(): readonly Lap[];
115
117
  /**
116
118
  * @description Formats the elapsed time in a human-readable representation.
117
- * @summary Uses {@link formatMs} to produce an `hh:mm:ss.mmm` string for display and logging.
118
- * @return {string} Elapsed time formatted for presentation.
119
+ * @summary This method uses {@link formatMs} to produce an `hh:mm:ss.mmm` string for display and logging.
120
+ * @return {string} The elapsed time, formatted for presentation.
119
121
  */
120
122
  toString(): string;
121
123
  /**
122
124
  * @description Serializes the stopwatch state.
123
- * @summary Provides a JSON-friendly snapshot including running state, elapsed time, and lap details.
124
- * @return {{running: boolean, elapsedMs: number, laps: Lap[]}} Serializable stopwatch representation.
125
+ * @summary This method provides a JSON-friendly snapshot that includes the running state, elapsed time, and lap details.
126
+ * @return {{running: boolean, elapsedMs: number, laps: Lap[]}} A serializable stopwatch representation.
125
127
  */
126
128
  toJSON(): {
127
129
  running: boolean;
@@ -131,9 +133,9 @@ export declare class StopWatch {
131
133
  }
132
134
  /**
133
135
  * @description Formats milliseconds into `hh:mm:ss.mmm`.
134
- * @summary Breaks the duration into hours, minutes, seconds, and milliseconds, returning a zero-padded string.
135
- * @param {number} ms - Milliseconds to format.
136
- * @return {string} Formatted duration string.
136
+ * @summary This function breaks the duration into hours, minutes, seconds, and milliseconds, and returns a zero-padded string.
137
+ * @param {number} ms - The milliseconds to format.
138
+ * @return {string} The formatted duration string.
137
139
  * @function formatMs
138
140
  * @memberOf module:Logging
139
141
  * @mermaid
package/lib/esm/time.js CHANGED
@@ -16,15 +16,17 @@ function safeNow() {
16
16
  return () => Date.now();
17
17
  }
18
18
  /**
19
- * @description High-resolution clock accessor returning milliseconds.
20
- * @summary Chooses the most precise timer available in the current runtime, preferring `performance.now` or `process.hrtime.bigint`.
21
- * @return {number} Milliseconds elapsed according to the best available clock.
19
+ * @description A high-resolution clock accessor that returns milliseconds.
20
+ * @summary This function chooses the most precise timer available in the current runtime, preferring `performance.now` or `process.hrtime.bigint`.
21
+ * @return {number} The milliseconds that have elapsed, according to the best available clock.
22
+ * @function now
23
+ * @memberOf module:Logging
22
24
  */
23
25
  export const now = safeNow();
24
26
  /**
25
- * @description High-resolution stopwatch with pause, resume, and lap tracking.
26
- * @summary Tracks elapsed time using the highest precision timer available, supports pausing, resuming, and recording labeled laps for diagnostics and benchmarking.
27
- * @param {boolean} [autoStart=false] - When true, the stopwatch starts immediately upon construction.
27
+ * @description A high-resolution stopwatch with pause, resume, and lap tracking.
28
+ * @summary This class tracks elapsed time using the highest precision timer available. It supports pausing, resuming, and recording labeled laps for diagnostics and benchmarking.
29
+ * @param {boolean} [autoStart=false] - When `true`, the stopwatch starts immediately upon construction.
28
30
  * @class StopWatch
29
31
  * @example
30
32
  * const sw = new StopWatch(true);
@@ -60,16 +62,16 @@ export class StopWatch {
60
62
  }
61
63
  /**
62
64
  * @description Indicates whether the stopwatch is actively running.
63
- * @summary Returns `true` when timing is in progress and `false` when paused or stopped.
64
- * @return {boolean} Current running state.
65
+ * @summary This method returns `true` when timing is in progress, and `false` when it is paused or stopped.
66
+ * @return {boolean} The current running state.
65
67
  */
66
68
  get running() {
67
69
  return this._running;
68
70
  }
69
71
  /**
70
- * @description Elapsed time captured by the stopwatch.
71
- * @summary Computes the total elapsed time in milliseconds, including the current session if running.
72
- * @return {number} Milliseconds elapsed since the stopwatch started.
72
+ * @description The elapsed time that has been captured by the stopwatch.
73
+ * @summary This method computes the total elapsed time in milliseconds, including the current session if it is running.
74
+ * @return {number} The milliseconds that have elapsed since the stopwatch started.
73
75
  */
74
76
  get elapsedMs() {
75
77
  if (!this._running || this._startMs == null)
@@ -78,8 +80,8 @@ export class StopWatch {
78
80
  }
79
81
  /**
80
82
  * @description Starts timing if the stopwatch is not already running.
81
- * @summary Records the current timestamp and transitions the stopwatch into the running state.
82
- * @return {this} Fluent reference to the stopwatch.
83
+ * @summary This method records the current timestamp and transitions the stopwatch into the running state.
84
+ * @return {this} A fluent reference to the stopwatch.
83
85
  */
84
86
  start() {
85
87
  if (!this._running) {
@@ -89,9 +91,9 @@ export class StopWatch {
89
91
  return this;
90
92
  }
91
93
  /**
92
- * @description Pauses timing and accumulates elapsed milliseconds.
93
- * @summary Captures the partial duration, updates the accumulator, and keeps the stopwatch ready to resume later.
94
- * @return {this} Fluent reference to the stopwatch.
94
+ * @description Pauses timing and accumulates the elapsed milliseconds.
95
+ * @summary This method captures the partial duration, updates the accumulator, and keeps the stopwatch ready to resume later.
96
+ * @return {this} A fluent reference to the stopwatch.
95
97
  */
96
98
  pause() {
97
99
  if (this._running && this._startMs != null) {
@@ -103,8 +105,8 @@ export class StopWatch {
103
105
  }
104
106
  /**
105
107
  * @description Resumes timing after a pause.
106
- * @summary Captures a fresh start timestamp while keeping previous elapsed time intact.
107
- * @return {this} Fluent reference to the stopwatch.
108
+ * @summary This method captures a fresh start timestamp, while keeping the previous elapsed time intact.
109
+ * @return {this} A fluent reference to the stopwatch.
108
110
  */
109
111
  resume() {
110
112
  if (!this._running) {
@@ -115,17 +117,17 @@ export class StopWatch {
115
117
  }
116
118
  /**
117
119
  * @description Stops timing and returns the total elapsed milliseconds.
118
- * @summary Invokes {@link StopWatch.pause} to consolidate elapsed time, leaving the stopwatch in a non-running state.
119
- * @return {number} Milliseconds accumulated across all runs.
120
+ * @summary This method invokes {@link StopWatch.pause} to consolidate the elapsed time, and leaves the stopwatch in a non-running state.
121
+ * @return {number} The milliseconds that have accumulated across all runs.
120
122
  */
121
123
  stop() {
122
124
  this.pause();
123
125
  return this._elapsedMs;
124
126
  }
125
127
  /**
126
- * @description Resets the stopwatch state while optionally continuing to run.
127
- * @summary Clears elapsed time and lap history, preserving whether the stopwatch should continue ticking.
128
- * @return {this} Fluent reference to the stopwatch.
128
+ * @description Resets the stopwatch state, while optionally continuing to run.
129
+ * @summary This method clears the elapsed time and lap history, and preserves whether the stopwatch should continue ticking.
130
+ * @return {this} A fluent reference to the stopwatch.
129
131
  */
130
132
  reset() {
131
133
  const wasRunning = this._running;
@@ -136,10 +138,10 @@ export class StopWatch {
136
138
  return this;
137
139
  }
138
140
  /**
139
- * @description Records a lap split since the stopwatch started or since the previous lap.
140
- * @summary Stores the lap metadata, updates cumulative tracking, and returns the newly created {@link Lap}.
141
- * @param {string} [label] - Optional label describing the lap.
142
- * @return {Lap} Lap snapshot capturing incremental and cumulative timings.
141
+ * @description Records a lap split since the stopwatch started, or since the previous lap.
142
+ * @summary This method stores the lap metadata, updates the cumulative tracking, and returns the newly created {@link Lap}.
143
+ * @param {string} [label] - An optional label that describes the lap.
144
+ * @return {Lap} A lap snapshot that captures incremental and cumulative timings.
143
145
  */
144
146
  lap(label) {
145
147
  const total = this.elapsedMs;
@@ -156,24 +158,24 @@ export class StopWatch {
156
158
  }
157
159
  /**
158
160
  * @description Retrieves the recorded lap history.
159
- * @summary Returns the internal lap array as a read-only view to prevent external mutation.
160
- * @return {Lap[]} Laps captured by the stopwatch.
161
+ * @summary This method returns the internal lap array as a read-only view to prevent external mutation.
162
+ * @return {Array<Lap>} The laps that have been captured by the stopwatch.
161
163
  */
162
164
  get laps() {
163
165
  return this._laps;
164
166
  }
165
167
  /**
166
168
  * @description Formats the elapsed time in a human-readable representation.
167
- * @summary Uses {@link formatMs} to produce an `hh:mm:ss.mmm` string for display and logging.
168
- * @return {string} Elapsed time formatted for presentation.
169
+ * @summary This method uses {@link formatMs} to produce an `hh:mm:ss.mmm` string for display and logging.
170
+ * @return {string} The elapsed time, formatted for presentation.
169
171
  */
170
172
  toString() {
171
173
  return formatMs(this.elapsedMs);
172
174
  }
173
175
  /**
174
176
  * @description Serializes the stopwatch state.
175
- * @summary Provides a JSON-friendly snapshot including running state, elapsed time, and lap details.
176
- * @return {{running: boolean, elapsedMs: number, laps: Lap[]}} Serializable stopwatch representation.
177
+ * @summary This method provides a JSON-friendly snapshot that includes the running state, elapsed time, and lap details.
178
+ * @return {{running: boolean, elapsedMs: number, laps: Lap[]}} A serializable stopwatch representation.
177
179
  */
178
180
  toJSON() {
179
181
  return {
@@ -185,9 +187,9 @@ export class StopWatch {
185
187
  }
186
188
  /**
187
189
  * @description Formats milliseconds into `hh:mm:ss.mmm`.
188
- * @summary Breaks the duration into hours, minutes, seconds, and milliseconds, returning a zero-padded string.
189
- * @param {number} ms - Milliseconds to format.
190
- * @return {string} Formatted duration string.
190
+ * @summary This function breaks the duration into hours, minutes, seconds, and milliseconds, and returns a zero-padded string.
191
+ * @param {number} ms - The milliseconds to format.
192
+ * @return {string} The formatted duration string.
191
193
  * @function formatMs
192
194
  * @memberOf module:Logging
193
195
  * @mermaid
@@ -1 +1 @@
1
- {"version":3,"file":"time.js","sourceRoot":"","sources":["../../src/time.ts"],"names":[],"mappings":"AAqBA,SAAS,OAAO;IACd,wCAAwC;IACxC,IACE,OAAO,UAAU,KAAK,WAAW;QACjC,OAAO,UAAU,CAAC,WAAW,EAAE,GAAG,KAAK,UAAU,EACjD,CAAC;QACD,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;IAC5C,CAAC;IACD,oEAAoE;IACpE,IACE,OAAO,OAAO,KAAK,WAAW;QAC9B,OAAQ,OAAe,CAAC,MAAM,EAAE,MAAM,KAAK,UAAU,EACrD,CAAC;QACD,OAAO,GAAG,EAAE;YACV,MAAM,EAAE,GAAI,OAAe,CAAC,MAAM,CAAC,MAAM,EAAY,CAAC,CAAC,cAAc;YACrE,OAAO,MAAM,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,QAAQ;QACzC,CAAC,CAAC;IACJ,CAAC;IACD,WAAW;IACX,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AAC1B,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,GA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