lib: remove dollar symbol for private function
Just remove '$' because this isn't a programming language like Python. PR-URL: https://github.com/nodejs/node/pull/25590 Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
f265225c19
commit
3a4521a4a2
@ -93,14 +93,14 @@ EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
||||
return this;
|
||||
};
|
||||
|
||||
function $getMaxListeners(that) {
|
||||
function _getMaxListeners(that) {
|
||||
if (that._maxListeners === undefined)
|
||||
return EventEmitter.defaultMaxListeners;
|
||||
return that._maxListeners;
|
||||
}
|
||||
|
||||
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
||||
return $getMaxListeners(this);
|
||||
return _getMaxListeners(this);
|
||||
};
|
||||
|
||||
// Returns the length and line number of the first sequence of `a` that fully
|
||||
@ -247,7 +247,7 @@ function _addListener(target, type, listener, prepend) {
|
||||
}
|
||||
|
||||
// Check for listener leak
|
||||
m = $getMaxListeners(target);
|
||||
m = _getMaxListeners(target);
|
||||
if (m > 0 && existing.length > m && !existing.warned) {
|
||||
existing.warned = true;
|
||||
// No error code for this since it is a Warning
|
||||
|
Loading…
x
Reference in New Issue
Block a user