From 212de3c5ec429a580d2e79ce3c2516b93b52b8f5 Mon Sep 17 00:00:00 2001 From: Weijia Wang <381152119@qq.com> Date: Sat, 7 Oct 2017 22:50:42 +0800 Subject: lib: use destructuring for some constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Tobias Nießen Reviewed-By: Ruben Bridgewater Reviewed-By: Gibson Fahnestock --- lib/string_decoder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/string_decoder.js') diff --git a/lib/string_decoder.js b/lib/string_decoder.js index f0bca57050..891ab5bdba 100644 --- a/lib/string_decoder.js +++ b/lib/string_decoder.js @@ -21,7 +21,7 @@ 'use strict'; -const Buffer = require('buffer').Buffer; +const { Buffer } = require('buffer'); const internalUtil = require('internal/util'); const errors = require('internal/errors'); const isEncoding = Buffer[internalUtil.kIsEncodingSymbol]; -- cgit v1.2.3