mentie 0.3.9 → 0.3.11

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/modules/cache.js CHANGED
@@ -64,7 +64,7 @@ cache.dump = () => {
64
64
  cache.stats = () => {
65
65
 
66
66
  // Get the number of keys in the cache
67
- const keys = Object.keys( _cache ).length
67
+ const keys = Object.keys( _cache )
68
68
 
69
69
  // Get the size in bytes of the cache
70
70
  const size_bytes = keys.reduce( ( acc, key ) => acc + JSON.stringify( _cache[key] ).length, 0 )
@@ -75,7 +75,7 @@ cache.stats = () => {
75
75
 
76
76
  // Return the stats
77
77
  return {
78
- keys,
78
+ keys: keys.length,
79
79
  size_bytes,
80
80
  size_mib,
81
81
  size_gib
@@ -69,7 +69,7 @@ env.web_loglevel = () => env.is_web() && new URLSearchParams( location?.search )
69
69
  * Retrieves the log level set via environment variables in a Node.js environment.
70
70
  * @returns {string|undefined} The log level from environment variables, or undefined if not set.
71
71
  */
72
- env.node_loglevel = () => env.is_node() && process.env?.LOG_LEVEL
72
+ env.node_loglevel = () => env.is_node() && process.env?.LOGLEVEL
73
73
 
74
74
  /**
75
75
  * Retrieves the effective log level based on the environment. Defaults to 'info' in development environments, 'error' otherwise.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mentie",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "Mentor's toolbelt",
5
5
  "type": "module",
6
6
  "main": "index.js",