Skip to content

Commit 45b59e5

Browse files
deokjinkimtargos
authored andcommitted
lib: fix naming convention of Symbol
`node.js` prefix is used for global symbol(`Symbol.for`). So remove `node.js` prefix from `Symbol` usage. Refs: https://github.com/nodejs/node/blob/main/doc/contributing/using-symbols.md#symbolforstring PR-URL: #53387 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
1 parent f4efb7f commit 45b59e5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/internal/event_target.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const kWeakHandler = Symbol('kWeak');
6565
const kResistStopPropagation = Symbol('kResistStopPropagation');
6666

6767
const kHybridDispatch = SymbolFor('nodejs.internal.kHybridDispatch');
68-
const kRemoveWeakListenerHelper = Symbol('nodejs.internal.removeWeakListenerHelper');
68+
const kRemoveWeakListenerHelper = Symbol('kRemoveWeakListenerHelper');
6969
const kCreateEvent = Symbol('kCreateEvent');
7070
const kNewListener = Symbol('kNewListener');
7171
const kRemoveListener = Symbol('kRemoveListener');

lib/internal/events/symbols.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const {
44
Symbol,
55
} = primordials;
66

7-
const kFirstEventParam = Symbol('nodejs.kFirstEventParam');
7+
const kFirstEventParam = Symbol('kFirstEventParam');
88

99
module.exports = {
1010
kFirstEventParam,

lib/internal/http2/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const {
3434
kIsNodeError,
3535
} = require('internal/errors');
3636

37-
const kSensitiveHeaders = Symbol('nodejs.http2.sensitiveHeaders');
37+
const kSensitiveHeaders = Symbol('sensitiveHeaders');
3838
const kSocket = Symbol('socket');
3939
const kProxySocket = Symbol('proxySocket');
4040
const kRequest = Symbol('request');

0 commit comments

Comments
 (0)