{"id":16228699,"url":"https://github.com/wsmd/sleepsort-promise","last_synced_at":"2025-04-08T04:49:14.614Z","repository":{"id":57362977,"uuid":"89282834","full_name":"wsmd/sleepsort-promise","owner":"wsmd","description":"😴 A Promise based implementation of SleepSort","archived":false,"fork":false,"pushed_at":"2017-05-02T02:20:57.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-14T05:03:01.449Z","etag":null,"topics":["algorithm","promise","sleepsort","sort","sorting-algorithms"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wsmd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-24T20:11:57.000Z","updated_at":"2017-04-28T16:52:06.000Z","dependencies_parsed_at":"2022-09-26T16:32:23.797Z","dependency_job_id":null,"html_url":"https://github.com/wsmd/sleepsort-promise","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmd%2Fsleepsort-promise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmd%2Fsleepsort-promise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmd%2Fsleepsort-promise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmd%2Fsleepsort-promise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wsmd","download_url":"https://codeload.github.com/wsmd/sleepsort-promise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247779763,"owners_count":20994572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","promise","sleepsort","sort","sorting-algorithms"],"created_at":"2024-10-10T12:56:12.481Z","updated_at":"2025-04-08T04:49:14.592Z","avatar_url":"https://github.com/wsmd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sleepsort-promise\n\n[![npm version](https://badge.fury.io/js/sleepsort-promise.svg)](https://badge.fury.io/js/sleepsort-promise)\n[![Build Status](https://travis-ci.org/wsmd/sleepsort-promise.svg?branch=master)](https://travis-ci.org/wsmd/sleepsort-promise)\n[![Coverage Status](https://coveralls.io/repos/github/wsmd/sleepsort-promise/badge.svg?branch=master)](https://codecov.io/gh/wsmd/sleepsort-promise)\n\nA `Promise` based implementation of the [sleepsort](https://rosettacode.org/wiki/Sorting_algorithms/Sleep_sort) algorithm.\n\n## Installation\n\n```bash\nnpm install --save sleepsort-promise\n```\n```bash\nyarn add sleepsort-promise\n```\n\n## Usage\n\n```js\nimport sleepSort from 'sleepsort-promise';\n\nconst numbers = [3, 10, 6, 7, 100, 4, 25];\n\nsleepSort(numbers)\n  .then((sortedNumbers) =\u003e {\n    console.log(sortedNumbers); // outputs: [3, 4, 6, 7, 10, 25, 100]\n  });\n```\n\nIn case `Promise` is not supported by your browser, you can alternatively use a callback.\n\n```js\nsleepSort(numbers, function(sortedNumbers) {\n  console.log(sortedNumbers); // outputs: [3, 4, 6, 7, 10, 25, 100]\n});\n```\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request\n\n## License\n\nMIT\n\n![](https://camo.githubusercontent.com/d0aa5dbb169c80f01a0a74709f43bd726b79c767/687474703a2f2f666f7274686562616467652e636f6d2f696d616765732f6261646765732f6d616b65732d70656f706c652d736d696c652e737667)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwsmd%2Fsleepsort-promise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwsmd%2Fsleepsort-promise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwsmd%2Fsleepsort-promise/lists"}