summaryrefslogtreecommitdiff
path: root/node_modules/debug/src
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-08-30 17:21:18 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-08-30 17:21:18 +0800
commitefbc2ffe6a1ee5ec38a4396305561d6515d0943e (patch)
tree2b4c94f18f2c792dfda813050755d5c0273fae22 /node_modules/debug/src
parent43acceb75957c880a5ba5a31aae221394a36d5f6 (diff)
node fixes, updates
Diffstat (limited to 'node_modules/debug/src')
-rw-r--r--node_modules/debug/src/browser.js4
-rw-r--r--node_modules/debug/src/node.js4
2 files changed, 5 insertions, 3 deletions
diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js
index cd0fc35d..8d808e58 100644
--- a/node_modules/debug/src/browser.js
+++ b/node_modules/debug/src/browser.js
@@ -125,6 +125,8 @@ function useColors() {
return false;
}
+ let m;
+
// Is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
@@ -132,7 +134,7 @@ function useColors() {
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
// Is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
// Double check webkit in userAgent just in case we are in a worker
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
}
diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js
index 79bc085c..715560a4 100644
--- a/node_modules/debug/src/node.js
+++ b/node_modules/debug/src/node.js
@@ -187,11 +187,11 @@ function getDate() {
}
/**
- * Invokes `util.format()` with the specified arguments and writes to stderr.
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
*/
function log(...args) {
- return process.stderr.write(util.format(...args) + '\n');
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
}
/**