overset / javascript-natural-sort

Sort things "naturally" in Javascript
MIT License
132 stars 62 forks source link

Any zeros that precede a number messes up the sorting #18

Closed menixator closed 9 years ago

menixator commented 9 years ago
['1', '02', '3'].sort(naturalSort)

Yields:

["02", "1", "3"]
overset commented 9 years ago

fixed with acc7f9c