{"id":15681683,"url":"https://github.com/jedwatson/randomkey","last_synced_at":"2025-06-30T13:33:24.062Z","repository":{"id":65411564,"uuid":"39119020","full_name":"JedWatson/randomkey","owner":"JedWatson","description":"Lightweight node.js lib for generating random string keys","archived":false,"fork":false,"pushed_at":"2017-03-02T01:51:11.000Z","size":4,"stargazers_count":10,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T10:27:21.007Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JedWatson.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":"2015-07-15T05:54:58.000Z","updated_at":"2019-08-18T16:48:08.000Z","dependencies_parsed_at":"2023-01-23T10:55:00.246Z","dependency_job_id":null,"html_url":"https://github.com/JedWatson/randomkey","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/JedWatson/randomkey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Frandomkey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Frandomkey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Frandomkey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Frandomkey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JedWatson","download_url":"https://codeload.github.com/JedWatson/randomkey/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Frandomkey/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262783429,"owners_count":23363546,"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-10-03T16:58:28.044Z","updated_at":"2025-06-30T13:33:24.011Z","avatar_url":"https://github.com/JedWatson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Randomkey\n\nLightweight node.js lib for generating random strings.\n\nYou can specify the length and character set to use.\n\nIf you specify length as an array `[min, max]` a number in the range will be\nused.\n\nThe character set defaults to:\n\n```\n0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz\n```\n\nSeveral character sets are provided as properties of the function:\n\n* `default`: `0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz`\n* `upper`: `ABCDEFGHIJKLMNOPQRSTUVWXTZ`\n* `lower`: `abcdefghijklmnopqrstuvwxtz`\n* `alphanumeric`: `0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ`\n* `numbers`: `0123456789`\n* `safe`: `2346789ABCDEFGHJKLMNPRTUVWXTZ`\n\n## Usage\n\n```\nnpm install --save randomkey\n```\n\n### randomkey(len, chars)\n\n```\nvar rk = require('randomkey');\n\n// generate a 10 character key using the default character set\nvar key = rk(10);\n\n// generate a 6 character key using only the characters `a`, `b` and `c`\nvar abc = rk(6, 'abc');\n\n// generate a 16 character key using the \"safe\" character set:\nvar safe = rk(16, rk.safe);\n\n// generate a key between 5 and 10 characters long with the default characters:\nvar variableLength = rk([5,10]);\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedwatson%2Frandomkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedwatson%2Frandomkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedwatson%2Frandomkey/lists"}