diff --git a/lib/util.js b/lib/util.js index 97c5c10fd87375..b034b29b55f74a 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; });