{"id":21627127,"url":"https://github.com/xxczaki/attoid","last_synced_at":"2025-04-11T12:46:54.011Z","repository":{"id":57186493,"uuid":"303829070","full_name":"xxczaki/attoid","owner":"xxczaki","description":"Secure URL-friendly unique string ID generator in \u003c8 LOC","archived":false,"fork":false,"pushed_at":"2020-12-28T02:17:19.000Z","size":60,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T21:50:32.163Z","etag":null,"topics":["attoid","crypto","cuid","hacktoberfest","id","nano-id","nanoid","random-id","random-string","secure-random-string","shortid","unique-string","uuid","uuid-v4","uuid4","uuidv4"],"latest_commit_sha":null,"homepage":"","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/xxczaki.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"xxczaki","patreon":"akepinski"}},"created_at":"2020-10-13T21:07:38.000Z","updated_at":"2025-04-04T09:57:22.000Z","dependencies_parsed_at":"2022-09-14T16:22:40.942Z","dependency_job_id":null,"html_url":"https://github.com/xxczaki/attoid","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/xxczaki%2Fattoid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxczaki%2Fattoid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxczaki%2Fattoid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxczaki%2Fattoid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xxczaki","download_url":"https://codeload.github.com/xxczaki/attoid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248402545,"owners_count":21097331,"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":["attoid","crypto","cuid","hacktoberfest","id","nano-id","nanoid","random-id","random-string","secure-random-string","shortid","unique-string","uuid","uuid-v4","uuid4","uuidv4"],"created_at":"2024-11-25T01:15:36.560Z","updated_at":"2025-04-11T12:46:53.989Z","avatar_url":"https://github.com/xxczaki.png","language":"TypeScript","funding_links":["https://github.com/sponsors/xxczaki","https://patreon.com/akepinski"],"categories":[],"sub_categories":[],"readme":"# Atto ID\n\n\u003e Secure URL-friendly unique string ID generator in ~8 LOC.\n\n[![Build Status](https://github.com/xxczaki/attoid/workflows/CI/badge.svg)](https://github.com/xxczaki/attoid/actions?query=workflow%3ACI)\n[![Coverage Status](https://coveralls.io/repos/github/xxczaki/attoid/badge.svg?branch=master)](https://coveralls.io/github/xxczaki/attoid?branch=master)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)\n\nThis module generates secure, URL-friendly and truly random IDs. It was inspired mainly by [Nano ID](https://github.com/ai/nanoid). It uses the new [`crypto.randomInt`](https://nodejs.org/api/crypto.html#crypto_crypto_randomint_min_max_callback) method introduced in Node.js v14.10.0. Besides limited compatibility, the performance is also relatively low in comparison with similar libraries (about 20k ops/sec).\n\n---\n\n## Highlights\n\n- Tiny size (\u003c8 LOC)\n- Same default ID length as in Nano ID\n- Bigger default dictionary (includes 2 additional characters - `~` and `.`)\n- Uses the truly random Crypto API\n- URL-friendly\n- Ability to customize dictionary\n- Well tested\n- Written in TypeScript\n\n## Install\n\n```\n$ npm install attoid\n```\n\n## Usage\n\n```js\nimport {attoid} from 'attoid';\n\nattoid(); // =\u003e V_SiU1mrfle.wZD9YbBQ\n```\n\n## API\n\n### attoid(length?, dictionary?)\n\nReturns a random string.\n\n##### length\n\nType: `number`\\\nDefault: `21`\n\nLength of the generated string.\n\n##### dictionary\n\nType: `string`\\\nDefault: `aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ1234567890-._~`\n\nCustom dictionary, from which the string should be generated.\n\n## License\n\nMIT © [Antoni Kepinski](https://kepinski.me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxczaki%2Fattoid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxxczaki%2Fattoid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxczaki%2Fattoid/lists"}