{"id":22381164,"url":"https://github.com/ex-machine/anid","last_synced_at":"2025-08-31T16:32:26.052Z","repository":{"id":57180045,"uuid":"149154073","full_name":"ex-machine/anid","owner":"ex-machine","description":"Generate alphanumeric unique ids","archived":false,"fork":false,"pushed_at":"2018-09-17T22:44:34.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-02T20:43:29.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/ex-machine.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":"2018-09-17T16:20:56.000Z","updated_at":"2018-09-19T02:21:50.000Z","dependencies_parsed_at":"2022-09-14T03:31:06.665Z","dependency_job_id":null,"html_url":"https://github.com/ex-machine/anid","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ex-machine/anid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ex-machine%2Fanid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ex-machine%2Fanid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ex-machine%2Fanid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ex-machine%2Fanid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ex-machine","download_url":"https://codeload.github.com/ex-machine/anid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ex-machine%2Fanid/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261386698,"owners_count":23150865,"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-12-05T00:07:39.891Z","updated_at":"2025-06-23T00:02:17.739Z","avatar_url":"https://github.com/ex-machine.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anid\n\nYet another unique **a**lpha**n**umeric **id** generator.\n\n* mixed case by default (L1kETH4t)\r\n* lower case option (l1keth4t)\r\n* string length option\n* very fast at default length (8 characters)\n* reasonably fast at maximum length (24 characters)\n* uses cryptographically insecure `Math.random()`\n* UMD format, works in Node.js and browsers\n* small footprint\n\n[![Build Status](https://api.travis-ci.com/ex-machine/anid.svg?branch=master)](https://travis-ci.com/ex-machine/anid) [![Coverage Status](https://coveralls.io/repos/github/ex-machine/anid/badge.svg)](https://coveralls.io/github/ex-machine/anid) ![gzip size](https://img.badgesize.io/https://raw.githubusercontent.com/ex-machine/anid/master/dist/anid.min.js?compression=gzip) [![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n\n## Installation\n\n### NPM\n\n```\nnpm i -S anid\n```\n\n### Yarn\n\n```\nyarn add anid\n```\n\n\n## API\n\n```js\nAnid([length = 8, [lowercase = false]])\n```\n\nReturns a function that generates alphanumeric unique id string.\n\n## Usage\n\n### Node.js\n\n```js\nconst Anid = require('anid');\n\nconst anid = Anid();\nconst anidLowercase = Anid(null, true);\nconst anidLong = Anid(24);\n\nconsole.log(anid()); // mXAL9KWY\nconsole.log(anidLowercase()); // pumlrb7e\nconsole.log(anidLong()); // NIJ174LksMaOOmykKkYce2UC\n```\n\n### Browser\n\n```html\n\u003cscript src=\"https://unpkg.com/anid/dist/anid.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n\nvar anid = Anid();\nvar anidLowercase = Anid(null, true);\nvar anidLong = Anid(24);\n\nconsole.log(anid()); // mXAL9KWY\nconsole.log(anidLowercase()); // pumlrb7e\nconsole.log(anidLong()); // NIJ174LksMaOOmykKkYce2UC\n\n\u003c/script\u003e\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fex-machine%2Fanid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fex-machine%2Fanid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fex-machine%2Fanid/lists"}