{"id":21156196,"url":"https://github.com/corvuscodex/fisher-yates-js","last_synced_at":"2026-04-22T23:34:38.837Z","repository":{"id":160612119,"uuid":"234923392","full_name":"CorvusCodex/Fisher-Yates-JS","owner":"CorvusCodex","description":"The Fisher–Yates shuffle is an algorithm for generating a random permutation of a finite sequence—in plain terms, the algorithm shuffles the sequence. The algorithm effectively puts all the elements into a hat; it continually determines the next element by randomly drawing an element from the hat until no elements remain. The algorithm produces an unbiased permutation: every permutation is equally likely. The modern version of the algorithm is efficient: it takes time proportional to the number of items being shuffled and shuffles them in place.","archived":false,"fork":false,"pushed_at":"2022-08-22T08:55:28.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T12:42:55.725Z","etag":null,"topics":["fisher-yates","fisher-yates-shuffle","javascript","javascriptrandom","nodejs","rng"],"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/CorvusCodex.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-19T15:42:52.000Z","updated_at":"2023-05-08T08:01:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f803b62-93e4-4327-baaa-5cf840e203a0","html_url":"https://github.com/CorvusCodex/Fisher-Yates-JS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CorvusCodex/Fisher-Yates-JS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorvusCodex%2FFisher-Yates-JS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorvusCodex%2FFisher-Yates-JS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorvusCodex%2FFisher-Yates-JS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorvusCodex%2FFisher-Yates-JS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CorvusCodex","download_url":"https://codeload.github.com/CorvusCodex/Fisher-Yates-JS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorvusCodex%2FFisher-Yates-JS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32159959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T17:06:48.269Z","status":"ssl_error","status_checked_at":"2026-04-22T17:06:19.037Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["fisher-yates","fisher-yates-shuffle","javascript","javascriptrandom","nodejs","rng"],"created_at":"2024-11-20T11:39:06.159Z","updated_at":"2026-04-22T23:34:38.817Z","avatar_url":"https://github.com/CorvusCodex.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fisher-Yates-JS\nThe Fisher–Yates shuffle is an algorithm for generating a random permutation of a finite sequence—in plain terms, the algorithm shuffles the sequence. The algorithm effectively puts all the elements into a hat; it continually determines the next element by randomly drawing an element from the hat until no elements remain. The algorithm produces an unbiased permutation: every permutation is equally likely. The modern version of the algorithm is efficient: it takes time proportional to the number of items being shuffled and shuffles them in place.\n\nHow to use: \n\nADD SCRIPT TO HEAD OF YOUR WEBSITE:\n\nIf using downloaded version:\n\n```\n\u003cscript src=\"fisher-yates.js\"\u003e\u003c/script\u003e\n\n```\n\nUsing CDN Version:\n\n```\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/AlturaDesigner/Fisher-Yates-JS@master/fisher%E2%80%93yates.js\"\u003e\u003c/script\u003e\n\n```\n\nCreate array:\nvar newarray = [1,2,3,4,5,6,7,8,9,10];\n\nThe simply call shuffle function:\n\nnewarray = shuffle(newarray);\n\nThat's it!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorvuscodex%2Ffisher-yates-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorvuscodex%2Ffisher-yates-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorvuscodex%2Ffisher-yates-js/lists"}