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/_tls_common.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/_tls_common.js') diff --git a/lib/_tls_common.js b/lib/_tls_common.js index 54b27a7bca..4196cc084c 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -26,8 +26,7 @@ const { isArrayBufferView } = require('internal/util/types'); const tls = require('tls'); const errors = require('internal/errors'); -const SSL_OP_CIPHER_SERVER_PREFERENCE = - process.binding('constants').crypto.SSL_OP_CIPHER_SERVER_PREFERENCE; +const { SSL_OP_CIPHER_SERVER_PREFERENCE } = process.binding('constants').crypto; // Lazily loaded var crypto = null; -- cgit v1.2.3