IP addresses currently sort the first chunk as a float.
This bug leads, for example, 192.200.2.3 to sorts before 192.42.2.3, instead of after it.
/* Version: 0.8.1 */
['192.200.2.3','192.42.2.3','192.3.2.1'].sort(naturalSort)
// actual> ["192.200.2.3", "192.3.2.1", "192.42.2.3"]
// expected> ["192.3.2.1", "192.42.2.3", "192.200.2.3"]
I ran into this when trying out this module as sorting algorithm for Wikipedia's tablesorter code, but it failed out unit tests.

IP addresses currently sort the first chunk as a float.
This bug leads, for example,
192.200.2.3to sorts before192.42.2.3, instead of after it.I ran into this when trying out this module as sorting algorithm for Wikipedia's tablesorter code, but it failed out unit tests.