Browse Source

lib: remove unnecessary parameter for assertCrypto()

The `exports` parameter is unnecessary.

PR-URL: https://github.com/nodejs/node/pull/10834
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <sam@strongloop.com>
v7.x
Jackson Tian 8 years ago
committed by Italo A. Casas
parent
commit
a3abba0b1a
  1. 2
      lib/_tls_legacy.js
  2. 2
      lib/_tls_wrap.js
  3. 2
      lib/crypto.js
  4. 2
      lib/https.js
  5. 2
      lib/internal/util.js
  6. 2
      lib/tls.js

2
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');

2
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');

2
lib/crypto.js

@ -4,7 +4,7 @@
'use strict';
const internalUtil = require('internal/util');
internalUtil.assertCrypto(exports);
internalUtil.assertCrypto();
exports.DEFAULT_ENCODING = 'buffer';

2
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');

2
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');
};

2
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');

Loading…
Cancel
Save