mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
lib: use destructuring for some constants
This change is to unify the declaration for constants into using destructuring on the top-level-module scope, reducing some redundant code. PR-URL: https://github.com/nodejs/node/pull/16063 Backport-PR-URL: https://github.com/nodejs/node/pull/16494 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This commit is contained in:
1 parent
fdc072bd9c
commit
96e82509b0
34 files changed
+131
-134
No files matched your search
@@ -21,7 +21,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const Buffer = require('buffer').Buffer;
|
||||
const { Buffer } = require('buffer');
|
||||
const internalUtil = require('internal/util');
|
||||
const isEncoding = Buffer[internalUtil.kIsEncodingSymbol];
|
||||
|
||||
|
||||
Reference in new issue
Block a user