Skip to content

Commit

Permalink
lib: remove dollar symbol for private function
Browse files Browse the repository at this point in the history
Just remove '$' because this isn't a programming language like Python.

PR-URL: #25590
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
MaleDong authored and addaleax committed Feb 8, 2019
1 parent c72c4b0 commit 1b8d2ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1b8d2ca

Please sign in to comment.