@meadown/logger 1.8.0 → 1.8.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.
package/README.md CHANGED
@@ -88,6 +88,8 @@ const user = await logger.tap(
88
88
  You can immediately see: was it successful? How long did it take? What came
89
89
  back? Without opening DevTools.
90
90
 
91
+ ![API response logging — tap a fetch and see timing, status, size, and body](media/tap-api-demo.png)
92
+
91
93
  Works with plain values too — logs it, returns it, nothing changes:
92
94
 
93
95
  ```ts
@@ -35,9 +35,9 @@ function formatDuration(ms, useColor) {
35
35
  const text = ms >= 1000 ? `${(ms / 1000).toFixed(2)}s` : `${ms}ms`;
36
36
  if (!useColor)
37
37
  return text;
38
- if (ms >= 3000)
38
+ if (ms >= 2000)
39
39
  return (0, color_js_1.colorize)(text, "red");
40
- if (ms >= 1000)
40
+ if (ms >= 500)
41
41
  return (0, color_js_1.colorize)(text, "yellow");
42
42
  return (0, color_js_1.colorize)(text, "green");
43
43
  }
@@ -31,9 +31,9 @@ function formatDuration(ms, useColor) {
31
31
  const text = ms >= 1000 ? `${(ms / 1000).toFixed(2)}s` : `${ms}ms`;
32
32
  if (!useColor)
33
33
  return text;
34
- if (ms >= 3000)
34
+ if (ms >= 2000)
35
35
  return colorize(text, "red");
36
- if (ms >= 1000)
36
+ if (ms >= 500)
37
37
  return colorize(text, "yellow");
38
38
  return colorize(text, "green");
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meadown/logger",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "A development-focused logger for Node.js and TypeScript — zero dependencies, clickable source links, and API response logging built in.",
5
5
  "keywords": [
6
6
  "logger",