{"id":19495127,"url":"https://github.com/abdullah0332/randomvalue-js","last_synced_at":"2025-02-25T20:27:45.436Z","repository":{"id":143904455,"uuid":"398483481","full_name":"Abdullah0332/randomvalue-js","owner":"Abdullah0332","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-21T06:40:46.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T03:40:03.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Abdullah0332.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":"2021-08-21T06:22:37.000Z","updated_at":"2021-08-21T06:40:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"339f3e6e-7f4e-437a-aff8-8389a82fdabd","html_url":"https://github.com/Abdullah0332/randomvalue-js","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/Abdullah0332%2Frandomvalue-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah0332%2Frandomvalue-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah0332%2Frandomvalue-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah0332%2Frandomvalue-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abdullah0332","download_url":"https://codeload.github.com/Abdullah0332/randomvalue-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240740713,"owners_count":19850026,"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-10T21:36:07.049Z","updated_at":"2025-02-25T20:27:45.414Z","avatar_url":"https://github.com/Abdullah0332.png","language":"JavaScript","readme":"# randomvalue-js\n\n\u003e Random Number Generator.\n\n# Install\n\n`npm install randomvalue-js`\n\n# Usage\n\n```javascript\nvar random = require(\"randomvalue-js\");\n\nrandom(); // sample output → 0.6916960302530633\n```\n\n## Default Options\n\nthe exported function takes an **params**\n\n- `min` : smallest possible value to return. defaults to 0.\n- `max` : largest possible value to return. defaults to 1.\n\n```js\nvar random = require(\"randomvalue-js\");\n\n// Default Random\nrandom();\n\n//Integer\nrandom.integer(); // example output -\u003e 0, default min = 0 and max = 1\n//or\nrandom.integer(min, max);\nrandom.integer(2, 10);\n\n//Float\nrandom.float(); // example output -\u003e 0.6916960302530633, default min = 0 and max = 1\n//or\nrandom.float(min, max);\nrandom.float(2, 10);\n\n//Boolean\nrandom.bool(); // example output -\u003e true\n```\n\n#### Table of Contents\n\n- [Random](#random)\n  - [integer](#integer)\n  - [float](#float)\n  - [bool](#bool)\n\n#### [random](https://github.com/transitive-bullshit/random/blob/e11a840a1cfe0f5bd9c43640f9645a0b28f61406/src/random.js#L47-L49)\n\nvar random = require(\"random-np\");\nrandom();\n\nType: `function ()`\n\n---\n\n#### [integer](https://github.com/transitive-bullshit/random/blob/e11a840a1cfe0f5bd9c43640f9645a0b28f61406/src/random.js#L152-L154)\n\nSamples a random integer, optionally specifying min and max values.\n\nConvence wrapper around `random.integer()`\n\nType: `function (min, max): number`\n\n- `min` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** (integer, inclusive) (optional, default `0`)\n- `max` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** (integer, inclusive) (optional, default `1`)\n\n---\n\n#### [float](https://github.com/transitive-bullshit/random/blob/e11a840a1cfe0f5bd9c43640f9645a0b28f61406/src/random.js#L138-L140)\n\nSamples a random floating point number, optionally specifying min and max values.\n\nConvence wrapper around `random.float()`\n\nType: `function (min, max): number`\n\n- `min` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** (float, inclusive) (optional, default `0`)\n- `max` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** (float, exclusive) (optional, default `1`)\n\n---\n\n#### [bool](https://github.com/transitive-bullshit/random/blob/e11a840a1cfe0f5bd9c43640f9645a0b28f61406/src/random.js#L181-L183)\n\nSamples a random boolean value.\n\nConvence wrapper around `random.bool()`\n\nType: `function (): boolean`\n\n---\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullah0332%2Frandomvalue-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullah0332%2Frandomvalue-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullah0332%2Frandomvalue-js/lists"}