standardize by hand
This commit is contained in:
parent
cfdfdc8ccc
commit
e6698102c9
13 changed files with 34 additions and 33 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue