1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

chore: remove let due to performance reasons

This commit is contained in:
Ruben Bridgewater
2017-05-26 12:45:34 +02:00
parent 065eebad9c
commit 6794478066
5 changed files with 18 additions and 18 deletions

View File

@@ -62,7 +62,7 @@ function clone (obj) {
var copy
if (Array.isArray(obj)) {
copy = new Array(obj.length)
for (let i = 0; i < obj.length; i++) {
for (var i = 0; i < obj.length; i++) {
copy[i] = clone(obj[i])
}
return copy
@@ -70,7 +70,7 @@ function clone (obj) {
if (Object.prototype.toString.call(obj) === '[object Object]') {
copy = {}
const elements = Object.keys(obj)
for (let elem = elements.pop(); elem !== undefined; elem = elements.pop()) {
for (var elem = elements.pop(); elem !== undefined; elem = elements.pop()) {
copy[elem] = clone(obj[elem])
}
return copy