Skip to content

Commit 15488cc

Browse files
committed
rename for clarity
1 parent 6c5c801 commit 15488cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/stringify.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function stringify(value) {
2323
const stringified = [];
2424

2525
/** @type {Map<any, number>} */
26-
const map = new Map();
26+
const indexes = new Map();
2727

2828
/** @type {string[]} */
2929
const keys = [];
@@ -36,7 +36,7 @@ export function stringify(value) {
3636
throw new DevalueError(`Cannot stringify a function`, keys);
3737
}
3838

39-
if (map.has(thing)) return map.get(thing);
39+
if (indexes.has(thing)) return indexes.get(thing);
4040

4141
if (thing === undefined) return UNDEFINED;
4242
if (Number.isNaN(thing)) return NAN;
@@ -45,7 +45,7 @@ export function stringify(value) {
4545
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO;
4646

4747
const index = p++;
48-
map.set(thing, index);
48+
indexes.set(thing, index);
4949

5050
let str = '';
5151

0 commit comments

Comments
 (0)