An open API service indexing awesome lists of open source software.

https://github.com/aeharding/timeout-sort

Timeout sort is an asynchronous integer sorting algorithm. It can sort all integers with O(max(input)+n).
https://github.com/aeharding/timeout-sort

Last synced: 3 months ago
JSON representation

Timeout sort is an asynchronous integer sorting algorithm. It can sort all integers with O(max(input)+n).

Awesome Lists containing this project

README

          

# timeout-sort

Timeout sort is an asynchronous integer sorting algorithm. It can sort all integers (+ & -) with O(max(abs(input))+n).

```js
var timeoutSort = require("timeout-sort");

// callback form
timeoutSort([5, 20, 642, -80], function cbSort(sortedArray, err) {
if (err) console.log("You suck!");
console.log(sortedArray);
});

// promise form
timeoutSort([5, 20, 642, -80]).then(function resolvedWithSort(sortedArray) {
console.log(sortedArray);
});
```

## Development

`npm install -g mocha coffee-script`

then

`npm start` (to compile)

`npm test`