{"id":19635860,"url":"https://github.com/tozd/identifier","last_synced_at":"2026-04-11T18:05:35.276Z","repository":{"id":201173757,"uuid":"707083720","full_name":"tozd/identifier","owner":"tozd","description":"Readable global identifiers. Read-only mirror of https://gitlab.com/tozd/identifier","archived":false,"fork":false,"pushed_at":"2025-04-09T11:44:26.000Z","size":441,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T12:30:45.268Z","etag":null,"topics":["go","javascript","node","typescript","web"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tozd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["plast8","mitar"]}},"created_at":"2023-10-19T07:34:30.000Z","updated_at":"2025-04-09T11:44:30.000Z","dependencies_parsed_at":"2024-03-25T09:51:42.241Z","dependency_job_id":"643b50cb-232c-4961-bd5e-6db9fb1ad6cc","html_url":"https://github.com/tozd/identifier","commit_stats":null,"previous_names":["tozd/identifier"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tozd/identifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fidentifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fidentifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fidentifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fidentifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tozd","download_url":"https://codeload.github.com/tozd/identifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fidentifier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269417679,"owners_count":24413421,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["go","javascript","node","typescript","web"],"created_at":"2024-11-11T12:27:17.951Z","updated_at":"2026-04-11T18:05:35.271Z","avatar_url":"https://github.com/tozd.png","language":"Go","funding_links":["https://github.com/sponsors/plast8","https://github.com/sponsors/mitar"],"categories":[],"sub_categories":[],"readme":"# Readable global identifiers\n\n[![pkg.go.dev](https://pkg.go.dev/badge/gitlab.com/tozd/identifier)](https://pkg.go.dev/gitlab.com/tozd/identifier)\n[![NPM](https://img.shields.io/npm/v/@tozd/identifier.svg)](https://www.npmjs.com/package/@tozd/identifier)\n[![Go Report Card](https://goreportcard.com/badge/gitlab.com/tozd/identifier)](https://goreportcard.com/report/gitlab.com/tozd/identifier)\n[![pipeline status](https://gitlab.com/tozd/identifier/badges/main/pipeline.svg?ignore_skipped=true)](https://gitlab.com/tozd/identifier/-/pipelines)\n[![coverage report](https://gitlab.com/tozd/identifier/badges/main/coverage.svg)](https://gitlab.com/tozd/identifier/-/graphs/main/charts)\n\nA package providing functions to generate and parse readable global identifiers.\n\nFeatures:\n\n- Identifiers have 128 bits of entropy, making them suitable as global identifiers.\n- By default identifiers are random, but you can convert existing\n  [UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) or (lists of) strings.\n- They are encoded into readable base 58 strings always of 22 characters in length.\n\n## Installation\n\n### Go installation\n\nYou can add it to your project using `go get`:\n\n```sh\ngo get gitlab.com/tozd/identifier\n```\n\nIt requires Go 1.24 or newer.\n\n### TypeScript/JavaScript installation\n\nYou can add it to your project using `npm`:\n\n```sh\nnpm install --save @tozd/identifer\n```\n\nIt requires node 22 or newer. It works in browsers, too.\n\n## Usage\n\n### Go usage\n\nSee full package documentation on [pkg.go.dev](https://pkg.go.dev/gitlab.com/tozd/identifier#section-documentation).\n\n### TypeScript/JavaScript usage\n\n```js\nimport { Identifier } from \"@tozd/identifier\"\n\nconst id = Identifier.new() // A random identifier.\nconst s = id.toString()\nconsole.log(s)\nIdentifier.valid(s) // True.\nIdentifier.fromString(s) // Is equal to id.\nconst u = Identifier.fromUUID(\"c97e2491-dd58-4a4e-b351-d786554e2ae6\") // Is equal to Rt7JRSoDY1woPhLidZNvz1.\nJSON.stringify({ id }) // Works, id is converted to string.\n```\n\n## Related projects\n\n- [Nano ID](https://github.com/ai/nanoid) – a similar project which allows more customization (both choosing\n  the alphabet and the size); this project supports only one type of identifiers to make sure everyone using\n  it has the same identifiers.\n\n## GitHub mirror\n\nThere is also a [read-only GitHub mirror available](https://github.com/tozd/identifier),\nif you need to fork the project there.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftozd%2Fidentifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftozd%2Fidentifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftozd%2Fidentifier/lists"}