-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't compare lowercase versions of strings in naturalCmp #326
Comments
I'd like it be consistent with the others too but I wonder if this is a bug or feature. Meaning do we need major version release if we change this. |
Yes I think we need a major release for this. Maybe someone was relaying on |
After a quick search,I found only one example where someone was using naturalCmp in a case insensitive sort. var _s = require('underscore.string');
var sortCaseInsensitive = function (objectlist) {
return objectlist.sort(function (a, b) {
return _s.naturalCmp(a.lastname + ' ' + a.firstname, b.lastname + ' ' + b.firstname);
});
}; |
This is pretty inconsistent with other implementations such as PHPs and python's natsort
(I'm using a fork of your lib while these issues are being resolved)
The text was updated successfully, but these errors were encountered: