Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A JavaScript module provides dictionary sort and natural sort for Node.js and browser.
CoffeeScript
tree: e6d4d1341e

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
src
test
README.md
makefile.coffee
package.json

README.md

SorterJS

Dictionary and natural sort module for Node.js, RequireJS and browser.

Installation

Node.js

$ npm install sorter

RequireJS

<script type="text/javascript" src="require.js"></script>
<script type="text/javascript">
  require(['sorter'], function (sorter) {
    var dictionarySort = sorter.dictionarySort;
    var naturalSort = sorter.naturalSort;
  });
</script>

browser

<script type="text/javascript" src="sorter.js"></script>
<script>
  var dictionarySort = window.mn.dsk.sorter.dictionarySort;
  var naturalSort = window.mn.dsk.sorter.naturalSort;
</script>

API Documentation

  • dictionarySort(array, key = null) -
  • naturalSort(array, key = null) -
Something went wrong with that request. Please try again.