{"id":14965881,"url":"https://github.com/smakss/random-string","last_synced_at":"2025-10-25T13:30:49.753Z","repository":{"id":40705355,"uuid":"261319468","full_name":"SMAKSS/random-string","owner":"SMAKSS","description":"Generates random dummy strings.","archived":false,"fork":false,"pushed_at":"2024-01-30T09:02:54.000Z","size":327,"stargazers_count":4,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-30T01:21:52.491Z","etag":null,"topics":["hacktoberfest","javascript","npm","npm-install","npm-package","random","random-generation","random-string","random-string-generators","random-strings","uuid","yarn","yarn-package","yarn-packages"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@smakss/random-string","language":"TypeScript","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/SMAKSS.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-05-04T23:39:36.000Z","updated_at":"2023-11-04T12:47:58.000Z","dependencies_parsed_at":"2024-06-21T15:34:00.013Z","dependency_job_id":"c3fdff72-cb87-48ed-b2d8-9bafb1852bab","html_url":"https://github.com/SMAKSS/random-string","commit_stats":{"total_commits":49,"total_committers":4,"mean_commits":12.25,"dds":"0.40816326530612246","last_synced_commit":"16ee0c314f417a285e72b27ff16bc790673b0a9d"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMAKSS%2Frandom-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMAKSS%2Frandom-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMAKSS%2Frandom-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMAKSS%2Frandom-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SMAKSS","download_url":"https://codeload.github.com/SMAKSS/random-string/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238147555,"owners_count":19424283,"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":["hacktoberfest","javascript","npm","npm-install","npm-package","random","random-generation","random-string","random-string-generators","random-strings","uuid","yarn","yarn-package","yarn-packages"],"created_at":"2024-09-24T13:35:30.733Z","updated_at":"2025-10-25T13:30:49.404Z","avatar_url":"https://github.com/SMAKSS.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Generate random string\n\n![npm](https://img.shields.io/npm/v/@smakss/random-string) ![NPM](https://img.shields.io/npm/l/@smakss/random-string) ![npm](https://img.shields.io/npm/dt/@smakss/random-string) ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@smakss/random-string)\n\nThis package will generate a random dummy string based on the available set of characters or provided ones, and you can also indicate the length of your desired random string. In case you don't care about uniqueness and don't want to use UUID, this package will help you to achieve what you want.\n\nIf you're in need of a UUID generation library, take a look at [@smakss/uuid](https://www.npmjs.com/package/@smakss/uuid), which offers robust UUID creation capabilities. For those who require more tailored options, [@smakss/password-generator](https://www.npmjs.com/package/@smakss/password-generator) provides a versatile solution for crafting custom passwords to fit a variety of needs.\n\n## Demo\n\nYou can check the [working demo](https://runkit.com/smakss/random-string) in runkit.\n\nor\n\n[![View @smakss/random-string](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/smakss-random-string-xlf6d2?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\n## How it works?\n\nTo install it you can simply do the following command:\n\n```bash\nnpm i @smakss/random-string\nor\nyarn add @smakss/random-string\n```\n\nTo include it with a common js module you should do this:\n\n```js\nconst randomString = require('@smakss/random-string');\n```\n\nAnd to include it with an ECMAScript module you can simply do this one:\n\n```js\nimport randomString from '@smakss/random-string';\n```\n\n## Examples of usage\n\nThen to use it within your application you can do it just like this:\n\nGenerate a random string with default parameters:\n\n```js\nrandomString();\n\n// Result example: 'GkL9#z$P!2'\n```\n\n**NOTE:** If the `length` is not provided, it will be selected randomly between 1 and 20.\n\nGenerate a random string with a specified length:\n\n```js\nrandomString({ length: 10 });\n\n// Result example: 'Sg67\u0026ZpQ8!'\n```\n\nYou can provide both length and allowed characters:\n\n```js\nrandomString({ length: 10, allowedCharacters: 'abCD#@' });\n\n// Result example: 'b@@#aDaC##'\n```\n\n## Contributing\n\nInterested in making contributions to this project? Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines and details.\n\n## Code of Conduct\n\nWe value and prioritize the well-being of all our contributors and users. To ensure that this project remains a welcoming space for everyone, please refer to our [Code of Conduct](./CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmakss%2Frandom-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmakss%2Frandom-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmakss%2Frandom-string/lists"}