summaryrefslogtreecommitdiff
path: root/lib/crypto.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2015-01-21 11:36:59 -0500
committercjihrig <cjihrig@gmail.com>2015-01-21 16:21:31 -0500
commit804e7aa9ab0b34fa88709ef0980b960abca5e059 (patch)
tree4e09207abd54e30bd62459e43e2f9219619a7256 /lib/crypto.js
parent803883bb1a701da12c285fd735233eed7627eada (diff)
downloadnodejs-804e7aa9ab0b34fa88709ef0980b960abca5e059.tar.gz
nodejs-804e7aa9ab0b34fa88709ef0980b960abca5e059.tar.bz2
nodejs-804e7aa9ab0b34fa88709ef0980b960abca5e059.zip
lib: use const to define constants
This commit replaces a number of var statements throughout the lib code with const statements. PR-URL: https://github.com/iojs/io.js/pull/541 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/crypto.js')
-rw-r--r--lib/crypto.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/crypto.js b/lib/crypto.js
index d08c29ca7..e27dad282 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -15,11 +15,11 @@ try {
throw new Error('node.js not compiled with openssl crypto support.');
}
-var constants = require('constants');
-var stream = require('stream');
-var util = require('util');
+const constants = require('constants');
+const stream = require('stream');
+const util = require('util');
-var DH_GENERATOR = 2;
+const DH_GENERATOR = 2;
// This is here because many functions accepted binary strings without
// any explicit encoding in older versions of node, and we don't want
@@ -36,8 +36,8 @@ function toBuf(str, encoding) {
exports._toBuf = toBuf;
-var assert = require('assert');
-var StringDecoder = require('string_decoder').StringDecoder;
+const assert = require('assert');
+const StringDecoder = require('string_decoder').StringDecoder;
function LazyTransform(options) {