{"id":18332520,"url":"https://github.com/cellular/variation","last_synced_at":"2025-04-09T18:39:19.173Z","repository":{"id":92903740,"uuid":"136026674","full_name":"cellular/variation","owner":"cellular","description":"Utility functions to pick random values 🎲","archived":false,"fork":false,"pushed_at":"2018-06-04T13:14:21.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T11:19:46.924Z","etag":null,"topics":[],"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/cellular.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-04T13:09:04.000Z","updated_at":"2018-06-04T13:14:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9f8cab8-5fbb-4586-b4d0-fcfd0efaffd3","html_url":"https://github.com/cellular/variation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellular%2Fvariation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellular%2Fvariation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellular%2Fvariation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellular%2Fvariation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cellular","download_url":"https://codeload.github.com/cellular/variation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248089375,"owners_count":21045892,"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":[],"created_at":"2024-11-05T19:39:16.477Z","updated_at":"2025-04-09T18:39:19.147Z","avatar_url":"https://github.com/cellular.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Variation 🎲\n\n[![Build Status](https://travis-ci.org/cellular/variation.svg?branch=master)](https://travis-ci.org/cellular/variation)\n\nUtility functions to add variations to any kind of output.\n\n## Usage Example\n\n```js\nconst { random, chance, randomItem } = require('variation');\n\nconsole.log(\n  random('hello', 'ciao', 'hola', 'salut'),\n  chance(0.5, 'beautiful'),\n  randomItem(['world', 'people'])\n);\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n-   [random](#random)\n-   [randomItem](#randomitem)\n-   [chance](#chance)\n\n### random\n\nReturns a random argument.\n\n**Parameters**\n\n-   `args` **...any** \n\n### randomItem\n\nReturns a random item from the given array.\n\n**Parameters**\n\n-   `array` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;any\u003e** \n\n### chance\n\nReturns `value` with the given probability, `false` otherwise.\n\n**Parameters**\n\n-   `probability` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**  (optional, default `0.5`)\n-   `value` **any**  (optional, default `true`)\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcellular%2Fvariation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcellular%2Fvariation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcellular%2Fvariation/lists"}