{"id":16707820,"url":"https://github.com/syuilo/rndstr","last_synced_at":"2025-04-10T05:16:30.372Z","repository":{"id":66355305,"uuid":"62003773","full_name":"syuilo/rndstr","owner":"syuilo","description":"Random string generator","archived":false,"fork":false,"pushed_at":"2018-06-20T11:02:35.000Z","size":9,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T06:45:14.202Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/syuilo.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-06-26T19:00:12.000Z","updated_at":"2024-06-11T05:04:52.000Z","dependencies_parsed_at":"2023-06-09T14:00:36.819Z","dependency_job_id":null,"html_url":"https://github.com/syuilo/rndstr","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"691eb0347de1c93b80a869fee661a2a0a8f85b69"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syuilo%2Frndstr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syuilo%2Frndstr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syuilo%2Frndstr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syuilo%2Frndstr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syuilo","download_url":"https://codeload.github.com/syuilo/rndstr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247914422,"owners_count":21017314,"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-12T19:41:08.538Z","updated_at":"2025-04-10T05:16:30.332Z","avatar_url":"https://github.com/syuilo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"rndstr.js\n-------------------------------\n\n[![][npm-badge]][npm-link]\n[![][mit-badge]][mit]\n\nGenerate random string\n\n## Install\n``` shell\n$ npm install rndstr --save\n```\n\n## Usage\n``` javascript\nrndstr(opts)\n```\n\n## Example\n``` javascript\nconst rndstr = require('rndstr');\n\nrndstr(); // ujvb17u5vxgqsh41mgwhlo3lfjrbz1xy2oi9zgxk7vh04r5p3cfc121fo8bkoj2j\nrndstr(); // 9rx8ghughdlihe35l7uzld4f3gvwa0wm0cb21ousiiit7q2uvrixo331zcdkb8kj\nrndstr(); // q1a334oio0t6sc5yqb2yjqmuym22acthfzhsnwrr67orp5hvjkj22r9fiehonly9\n\n// === Use custom options ===\nrndstr({length: 8, chars: '0-9'}); // 51048708\nrndstr({length: 8, chars: '0-9'}); // 80987908\nrndstr({length: 8, chars: '0-9'}); // 72556885\n\n// === Specify seed ===\nrndstr({seed: 'himawari'}); // Always m8ucpxibnp98qd8791hv98h1knfdypimztyfo3agu7gj757uyicjdea8wwyrpwab\nrndstr({seed: 'sakurako'}); // Always kybaq23mek8580s246kjkngupc9zsuyjuqgh6jkbale5btvtzssxjn2g6nienuyq\n\n// === Enable/Disable range-syntax parser ===\nrndstr({length: 16, chars: 'a-z', parseRange: true}); // sbywqwriyielxske\nrndstr({length: 16, chars: 'a-z', parseRange: false}); // az--a--zaa-a-aa-\n```\n\n## Options\n| Property       | Type                   | Description                                                | Default    |\n| :------------- | :--------------------- | :--------------------------------------------------------- | :--------- |\n| **length**     | *number*               | The length of your resulting string                        | `64`       |\n| **chars**      | *string* or *string[]* | The chars you want to include                              | `'a-z0-9'` |\n| **seed**       | *string* or *number*   | The seed value to be used to generate                      | `null`     |\n| **parseRange** | *boolean*              | Whether a given **chars** be interpreted as a range-syntax | `true`     |\n\n## On TypeScript\nType definition are bundled.\n``` typescript\nimport rndstr from 'rndstr';\n```\n\n## License\n[MIT](LICENSE)\n\n[npm-link]:  https://www.npmjs.com/package/rndstr\n[npm-badge]: https://img.shields.io/npm/v/rndstr.svg?style=flat-square\n[mit]:       http://opensource.org/licenses/MIT\n[mit-badge]: https://img.shields.io/badge/license-MIT-444444.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyuilo%2Frndstr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyuilo%2Frndstr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyuilo%2Frndstr/lists"}