We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0915f59 commit e74c9c4Copy full SHA for e74c9c4
util.js
@@ -73,17 +73,17 @@ exports.format = function(f) {
73
// Returns a modified function which warns once by default.
74
// If --no-deprecation is set, then it is a no-op.
75
exports.deprecate = function(fn, msg) {
76
+ if (typeof process !== 'undefined' && process.noDeprecation === true) {
77
+ return fn;
78
+ }
79
+
80
// Allow for deprecating things in the process of starting up.
- if (isUndefined(global.process)) {
81
+ if (typeof process === 'undefined') {
82
return function() {
83
return exports.deprecate(fn, msg).apply(this, arguments);
84
};
85
}
86
- if (process.noDeprecation === true) {
- return fn;
- }
-
87
var warned = false;
88
function deprecated() {
89
if (!warned) {
0 commit comments