Skip to content

Commit 85740e2

Browse files
committed
Use a regular Map in the walk function
1 parent 93cf989 commit 85740e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/json-dry.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ function stringify(value, replacer, space) {
14701470
*
14711471
* @author Jelle De Loecker <jelle@elevenways.be>
14721472
* @since 0.4.2
1473-
* @version 1.0.0
1473+
* @version 2.0.1
14741474
*
14751475
* @param {Object} obj The object to walk over
14761476
* @param {Function} fnc The function to perform on every entry
@@ -1487,7 +1487,7 @@ function walk(obj, fnc, result, seen) {
14871487
i;
14881488

14891489
if (!seen) {
1490-
seen = new WeakMap();
1490+
seen = new Map();
14911491
}
14921492

14931493
seen.set(obj, true);

0 commit comments

Comments
 (0)