Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions util.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ exports.format = function(f) {
// Returns a modified function which warns once by default.
// If --no-deprecation is set, then it is a no-op.
exports.deprecate = function(fn, msg) {
if (typeof process !== 'undefined' && process.noDeprecation === true) {
return fn;
}

// Allow for deprecating things in the process of starting up.
if (isUndefined(global.process)) {
if (typeof process === 'undefined') {
return function() {
return exports.deprecate(fn, msg).apply(this, arguments);
};
}

if (process.noDeprecation === true) {
return fn;
}

var warned = false;
function deprecated() {
if (!warned) {
Expand Down