From 0af3a32b459b82a0265ecb7d6683d7962fe625c9 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 20 Mar 2022 00:10:18 +0100 Subject: [PATCH] Create a null-prototype object for the mapping instead --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3632c27..cf90561 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ "use strict"; module.exports = function splitFilter(array, ensureCategories, predicate) { - let results = {}; + let results = Object.create(null); if (ensureCategories != null) { for (let category of ensureCategories) {