I think @bakkot brought up today that JS might want to work in the direction of having more comparators for various use cases.
This proposal would fit very well into such a framework, better than as a free function on String. Can we investigate that direction?