Skip to content

Commit b0efa59

Browse files
committed
Remove Set as the cache in removeDups
1 parent bd44274 commit b0efa59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,13 @@ function traverse(config) {
194194
* @return {String[]}
195195
*/
196196
function removeDups(list) {
197-
const cache = {};
197+
const cache = new Set();
198198
const unique = [];
199199

200200
list.forEach(function(item) {
201-
if (!cache[item]) {
201+
if (!cache.has(item)) {
202202
unique.push(item);
203-
cache[item] = true;
203+
cache.add(item);
204204
}
205205
});
206206

0 commit comments

Comments
 (0)