1.1.3 • Published 8 years ago

sleepsort-promise v1.1.3

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

sleepsort-promise

npm version Build Status Coverage Status

A Promise based implementation of the sleepsort algorithm.

Installation

npm install --save sleepsort-promise
yarn add sleepsort-promise

Usage

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.

sleepSort(numbers, function(sortedNumbers) {
  console.log(sortedNumbers); // outputs: [3, 4, 6, 7, 10, 25, 100]
});

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

License

MIT

npm.io

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago