A Promise based implementation of Sleepsort, an O(wtf) sorting algorithm
npm install sleepsort-promise


A Promise based implementation of the sleepsort algorithm.
``bash`
npm install --save sleepsort-promise`bash`
yarn add sleepsort-promise
`js
import sleepSort from 'sleepsort-promise';
const numbers = [3, 10, 6, 7, 100, 4, 25];
sleepSort(numbers)
.then((sortedNumbers) => {
console.log(sortedNumbers); // outputs: [3, 4, 6, 7, 10, 25, 100]
});
`
In case Promise is not supported by your browser, you can alternatively use a callback.
`js`
sleepSort(numbers, function(sortedNumbers) {
console.log(sortedNumbers); // outputs: [3, 4, 6, 7, 10, 25, 100]
});
1. Fork it!
2. Create your feature branch: git checkout -b my-new-featuregit commit -am 'Add some feature'
3. Commit your changes: git push origin my-new-feature`
4. Push to the branch:
5. Submit a pull request
MIT
