lib: use object destructuring tls.js

This commit updates canonicalizeIP and Buffer to use object
destructuring which is done for other functions in lib/tls.js

PR-URL: https://github.com/nodejs/node/pull/20070
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
Daniel Bevenius 2018-04-16 11:54:23 +02:00
parent 61e2879539
commit 72d15866ac

View File

@ -30,10 +30,10 @@ const { isUint8Array } = require('internal/util/types');
const net = require('net');
const url = require('url');
const binding = process.binding('crypto');
const Buffer = require('buffer').Buffer;
const { Buffer } = require('buffer');
const EventEmitter = require('events');
const DuplexPair = require('internal/streams/duplexpair');
const canonicalizeIP = process.binding('cares_wrap').canonicalizeIP;
const { canonicalizeIP } = process.binding('cares_wrap');
// Allow {CLIENT_RENEG_LIMIT} client-initiated session renegotiations
// every {CLIENT_RENEG_WINDOW} seconds. An error event is emitted if more