sorting
v1.0.1
Published
Javascript implementation of popular sorting algorithms
Downloads
100
Maintainers
Readme
Sorting
This repo contains Javascript implementation of popular sorting algorithms.
All the implementations work in browser as well as nodejs environments.
API Naming convention
Algorithm implementation is exposed as a functions named after algorithm in camelcasing. For eg: bubble-sort is exposed as bubbleSort
Usage
Below steps outline how it can be used in broser and node.
Browser
- Every algorithm resides in its own file. So its easy to loacate what you need.
- Include your choices via script tags.
- The implementations are exposed as window.sort object. Eg: window.sort.bubbleSort
Node
- All you need to do is require('sort') and you get an object that contans all implementations.