From e2c4986771dd0f00c6ed13f16e7a38aceac9a7a9 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Mon, 16 Jan 2017 17:19:32 +0800 Subject: [PATCH] lib: remove unnecessary parameter for assertCrypto() The `exports` parameter is unnecessary. PR-URL: https://github.com/nodejs/node/pull/10834 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Brian White Reviewed-By: James M Snell Reviewed-By: Sam Roberts --- lib/_tls_legacy.js | 2 +- lib/_tls_wrap.js | 2 +- lib/crypto.js | 2 +- lib/https.js | 2 +- lib/internal/util.js | 2 +- lib/tls.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index f974b0cfc05575..e765b2507e7502 100644 --- a/lib/_tls_legacy.js +++ b/lib/_tls_legacy.js @@ -1,6 +1,6 @@ 'use strict'; -require('internal/util').assertCrypto(exports); +require('internal/util').assertCrypto(); const assert = require('assert'); const EventEmitter = require('events'); diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 434384cec81595..721cdde142519c 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -1,6 +1,6 @@ 'use strict'; -require('internal/util').assertCrypto(exports); +require('internal/util').assertCrypto(); const assert = require('assert'); const crypto = require('crypto'); diff --git a/lib/crypto.js b/lib/crypto.js index c33728ac88c91f..9180ce70dce12e 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -4,7 +4,7 @@ 'use strict'; const internalUtil = require('internal/util'); -internalUtil.assertCrypto(exports); +internalUtil.assertCrypto(); exports.DEFAULT_ENCODING = 'buffer'; diff --git a/lib/https.js b/lib/https.js index aed92779cc89a6..e59e7dfcb6beeb 100644 --- a/lib/https.js +++ b/lib/https.js @@ -1,6 +1,6 @@ 'use strict'; -require('internal/util').assertCrypto(exports); +require('internal/util').assertCrypto(); const tls = require('tls'); const url = require('url'); diff --git a/lib/internal/util.js b/lib/internal/util.js index 81409e9b0ee2ea..7b1417d8fe1ace 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -97,7 +97,7 @@ exports.objectToString = function objectToString(o) { }; const noCrypto = !process.versions.openssl; -exports.assertCrypto = function(exports) { +exports.assertCrypto = function() { if (noCrypto) throw new Error('Node.js is not compiled with openssl crypto support'); }; diff --git a/lib/tls.js b/lib/tls.js index 56da56029fc94b..bb4719d9b02c93 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -1,7 +1,7 @@ 'use strict'; const internalUtil = require('internal/util'); -internalUtil.assertCrypto(exports); +internalUtil.assertCrypto(); const net = require('net'); const url = require('url');