Closed Fil closed 3 years ago
now we can distinguish 0 and "0"—which risks to break a lot of applications.
This feels like a highly desirable breaking change that merits a major version bump on d3-scale
.
We could pass String as the second argument to the InternMap constructor, but I think the whole goal here is to rely on valueOf instead of string coercion. Making it a major version bump sounds fine to me, although it’ll be a pain to update hundreds of notebooks for such a tiny change.
Yes it fails because keys were coerced to strings, but now we can distinguish 0 and "0"—which risks to break a lot of applications.
A solution is to keep coercing everything to string when looking in the index:
This fixes the tests, but then it's not better than the current implementation…