Skip to content

Commit 4bb7275

Browse files
committed
adopt InternMap
1 parent 248b424 commit 4bb7275

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/transforms/stack.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,14 @@ function maybeRank(rank, data, I, X, Y, Z) {
218218
}
219219

220220
// a generic function
221-
if (typeof rank === "function") {
222-
return valueof(data, rank);
223-
}
221+
if (typeof rank === "function") return valueof(data, rank);
224222

225223
// an array or iterable of z (particularly useful with groupSort)
226224
return positions(Z, rank);
227225
}
228226

229227
// returns the positions of each element of A in B
230228
function positions(A, B) {
231-
B = new Map(Array.from(B, (d, i) => [d, i]));
229+
B = new InternMap(Array.from(B, (d, i) => [d, i]));
232230
return A.map(d => B.get(d));
233231
}

0 commit comments

Comments
 (0)