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

@ -20,7 +20,7 @@ class CallbacksRegistry {
// Capture the location of the function and put it in the ID string,
// so that release errors can be tracked down easily.
regexp = /at (.*)/gi
stackString = (new Error).stack
stackString = (new Error()).stack
while ((match = regexp.exec(stackString)) !== null) {
location = match[1]
if (location.indexOf('(native)') !== -1) {

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)