
Product
Introducing Module Reachability: Focus on the Vulnerabilities That Matter
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
natural-sort
Advanced tools
Sorting with support for numbers, dates, unicode and more.
['10. tenth', 'odd', 1, '', '2. second'].sort(naturalSort())
// [1, '2. second', '10. tenth', 'odd', '']
[3, 4, 1, 5, 2].sort(naturalSort({direction: 'desc'}))
// [5, 4, 3, 2, 1]
['a', 'B'].sort(naturalSort())
// ['a', 'B']
['a', 'B'].sort(naturalSort({caseSensitive: true}))
// ['B', 'a']
npm install natural-sort
bower install natural-sort
<script src="/bower_components/natural-sort/dist/natural-sort.js"></script>
The original version of this algorithm was published by Jim Palmer in this blog post.
FAQs
Sorting with support for numbers, dates, unicode and more.
The npm package natural-sort receives a total of 3,002 weekly downloads. As such, natural-sort popularity was classified as popular.
We found that natural-sort demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Company News
Socket is bringing best-in-class reachability analysis into the platform — cutting false positives, accelerating triage, and cementing our place as the leader in software supply chain security.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.