diff --git a/lib/util.js b/lib/util.js index 9a68ea0068cbf3..928e148e28c80b 100644 --- a/lib/util.js +++ b/lib/util.js @@ -159,9 +159,9 @@ function stylizeNoColor(str, styleType) { function arrayToHash(array) { - var hash = {}; + var hash = Object.create(null); - array.forEach(function(val, idx) { + array.forEach(function(val) { hash[val] = true; });