standardize by hand

This commit is contained in:
Zeke Sikelianos 2016-03-28 17:35:49 -07:00 committed by Kevin Sawicki
parent cfdfdc8ccc
commit e6698102c9
13 changed files with 34 additions and 33 deletions

View file

@ -23,9 +23,9 @@ deprecate.rename = function (object, oldName, newName) {
return this[newName].apply(this, arguments)
}
if (typeof object === 'function') {
return object.prototype[oldName] = newMethod
object.prototype[oldName] = newMethod
} else {
return object[oldName] = newMethod
object[oldName] = newMethod
}
}
@ -33,7 +33,7 @@ deprecate.rename = function (object, oldName, newName) {
deprecate.member = function (object, method, member) {
var warned
warned = false
return object.prototype[method] = function () {
object.prototype[method] = function () {
if (!(warned || process.noDeprecation)) {
warned = true
deprecate.warn(method, member + '.' + method)