{"id":16471901,"url":"https://github.com/abranhe/bubble-srt","last_synced_at":"2025-07-07T07:37:38.977Z","repository":{"id":57190819,"uuid":"145316070","full_name":"abranhe/bubble-srt","owner":"abranhe","description":"Bubble Sort Algorithm Implementation","archived":false,"fork":false,"pushed_at":"2018-08-19T19:53:15.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T23:34:59.299Z","etag":null,"topics":["algorithm","bubble-sort","sorting-algorithms"],"latest_commit_sha":null,"homepage":"https://npm.im/bubble-srt","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/abranhe.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":"2018-08-19T15:43:37.000Z","updated_at":"2018-10-26T04:40:52.000Z","dependencies_parsed_at":"2022-09-15T07:22:06.964Z","dependency_job_id":null,"html_url":"https://github.com/abranhe/bubble-srt","commit_stats":null,"previous_names":["abranhe/bubble-srt","abrahamhba/bubble-srt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Fbubble-srt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Fbubble-srt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Fbubble-srt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Fbubble-srt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abranhe","download_url":"https://codeload.github.com/abranhe/bubble-srt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241094243,"owners_count":19908647,"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","bubble-sort","sorting-algorithms"],"created_at":"2024-10-11T12:15:16.360Z","updated_at":"2025-02-28T03:21:16.294Z","avatar_url":"https://github.com/abranhe.png","language":"JavaScript","readme":"\u003cp align=\"center\" id=\"top\"\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/bubble-srt\"\u003e\u003cimg src=\"https://cdn.abraham.gq/projects/bubble-srt/bubble-sort.gif\"\u003e\u003c/a\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/bubble-srt\"\u003e\u003cb\u003ebubble-srt\u003c/b\u003e\u003c/a\u003e\n\t: Bubble Sort Algorithm Implementation\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003c!-- Travis CI --\u003e\n\t\u003ca href=\"https://travis-ci.org/abranhe/bubble-srt\"\u003e\u003cimg src=\"https://img.shields.io/travis/abranhe/bubble-srt.svg?logo=travis\" /\u003e\u003c/a\u003e\n\t\u003c!-- LICENSE --\u003e\n\t\u003ca href=\"https://github.com/abranhe/bubble-srt/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/abranhe/bubble-srt.svg\" /\u003e\u003c/a\u003e\n\t\u003c!-- NPM Version --\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/bubble-srt\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/bubble-srt.svg\" /\u003e\u003c/a\u003e\n\t\u003c!-- @abranhe --\u003e\n\t\u003ca href=\"https://github.com/abranhe\"\u003e\u003cimg src=\"https://abranhe.com/badge.svg\"\u003e\u003c/a\u003e\n\t\u003c!-- Cash me --\u003e\n\t\u003ca href=\"https://cash.me/$abranhe\"\u003e\u003cimg src=\"https://cdn.abraham.gq/badges/cash-me.svg\"\u003e\u003c/a\u003e\n\t\u003c!-- Patreon --\u003e\n\t\u003ca href=\"https://www.patreon.com/abranhe\"\u003e\u003cimg src=\"https://cdn.abraham.gq/badges/patreon.svg\" /\u003e\u003c/a\u003e\n\t\u003c!-- Paypal --\u003e\n\t\u003ca href=\"https://paypal.me/abranhe/10\"\u003e\u003cimg src=\"https://cdn.abraham.gq/badges/paypal.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Overview\n\nBubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order.\n\nThe pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. The algorithm, which is a comparison sort, is named for the way smaller or larger elements \"bubble\" to the top of the list. Although the algorithm is simple, it is too slow and impractical for most problems even when compared to insertion sort. Bubble sort can be practical if the input is in mostly sorted order with some out-of-order elements nearly in position\n\n# Install\n\n```\nnpm install bubble-srt\n```\n\n# Usage\n\n```js\nconst bubbleSort = require('bubble-srt');\n\nlet numsArr = [46, 24, 33, 10, 2, 81, 50];\nconsole.log(bubbleSort(numsArr));\n// =\u003e [ 2, 10, 24, 33, 46, 50, 81 ]\n\nlet lettersArr = ['d', 'h', 'z', 'a', 'r', 'b', 'i'];\nconsole.log(bubbleSort(lettersArr));\n// =\u003e [ 'a', 'b', 'd', 'h', 'i', 'r', 'z' ]\n\nlet wordsArr = ['happy', 'auto', 'energy', 'zoo', 'trigonometry', 'dog', 'foo'];\nconsole.log(bubbleSort(wordsArr));\n// =\u003e [ 'auto', 'dog', 'energy', 'foo', 'happy', 'trigonometry', 'zoo' ]\n```\n\n# Related\n\n- [bubble-srt-cli](https://github.com/abranhe/bubble-srt-cli): CLI for this module\n# Team\n\n|[![Carlos Abraham Logo](https://avatars3.githubusercontent.com/u/21347264?s=50\u0026v=4)](https://19cah.com)|\n| :-: |\n| [Carlos Abraham](https://github.com/abranhe) |\n\n# License\n\n[MIT](https://github.com/abranhe/bubble-srt/blob/master/LICENSE) License © [Carlos Abraham](https://github.com/abranhe/)\n","funding_links":["https://www.patreon.com/abranhe","https://paypal.me/abranhe/10"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabranhe%2Fbubble-srt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabranhe%2Fbubble-srt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabranhe%2Fbubble-srt/lists"}