From 1b8d2ca85ff8a0983572e26c8e627dce553e3e11 Mon Sep 17 00:00:00 2001 From: MaleDong Date: Sun, 20 Jan 2019 18:41:25 +0800 Subject: [PATCH] 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 Reviewed-By: Gus Caplan Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- lib/events.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/events.js b/lib/events.js index fab8652ebf0457..2d7ae8945ff0b2 100644 --- a/lib/events.js +++ b/lib/events.js @@ -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