{"id":40870882,"url":"https://github.com/mderazon/ab-group","last_synced_at":"2026-01-22T00:40:02.754Z","repository":{"id":57171847,"uuid":"444373246","full_name":"mderazon/ab-group","owner":"mderazon","description":"Generate ab-groups from user ids for your a/b tests","archived":false,"fork":false,"pushed_at":"2022-01-04T10:24:15.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-21T09:44:06.541Z","etag":null,"topics":["ab-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mderazon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-04T10:15:32.000Z","updated_at":"2022-01-05T11:46:48.000Z","dependencies_parsed_at":"2022-08-24T14:40:50.281Z","dependency_job_id":null,"html_url":"https://github.com/mderazon/ab-group","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mderazon/ab-group","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mderazon%2Fab-group","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mderazon%2Fab-group/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mderazon%2Fab-group/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mderazon%2Fab-group/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mderazon","download_url":"https://codeload.github.com/mderazon/ab-group/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mderazon%2Fab-group/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28648460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"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":["ab-testing"],"created_at":"2026-01-22T00:40:02.128Z","updated_at":"2026-01-22T00:40:02.749Z","avatar_url":"https://github.com/mderazon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ab-group\n\n[![Build status](https://github.com/mderazon/ab-group/workflows/build/badge.svg)](https://github.com/mderazon/ab-group/actions) [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\n\u003e Easily generate ab-groups from user ids for your a/b tests\n\n## Usage\n\n```js\nconst abGroup = require(\"ab-group\");\n\nabGroup(\"usr_ZvKYlo2C0PT9H6G5\"); // returns 0\nabGroup(\"usr_1032D82eZvKYlo2C\"); // returns 1\n```\n\n## Behavior\n\n1. Deterministic - Given the same input, it will always output the same group.\n2. Random - It is not biased towards any of the groups. This is under the assumption that **your ids are randomly generated**.\n\n## API\n\n```js\nabGroup(id, groups);\n```\n\n- `id`: **mandatory**. An ID (or any string) to calculate the a/b group from.\n- `groups`: **optional**. Number of groups. Defaults for 2 groups (A/B) but you can use it to generate more groups.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmderazon%2Fab-group","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmderazon%2Fab-group","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmderazon%2Fab-group/lists"}