{"id":17188279,"url":"https://github.com/jclem/base62_uuid","last_synced_at":"2025-04-13T19:14:44.909Z","repository":{"id":57479386,"uuid":"68732232","full_name":"jclem/base62_uuid","owner":"jclem","description":" A library for generating 22-byte-length, Base62-encoded v4 UUIDs","archived":false,"fork":false,"pushed_at":"2022-02-16T16:57:41.000Z","size":46,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T17:31:08.132Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/base62_uuid","language":"Elixir","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/jclem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-20T16:38:01.000Z","updated_at":"2024-07-15T13:21:56.000Z","dependencies_parsed_at":"2022-09-17T04:51:56.966Z","dependency_job_id":null,"html_url":"https://github.com/jclem/base62_uuid","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fbase62_uuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fbase62_uuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fbase62_uuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fbase62_uuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jclem","download_url":"https://codeload.github.com/jclem/base62_uuid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766769,"owners_count":21158301,"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-15T01:08:34.530Z","updated_at":"2025-04-13T19:14:44.886Z","avatar_url":"https://github.com/jclem.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Base62UUID [![Coverage Status](https://coveralls.io/repos/github/jclem/base62_uuid/badge.svg?branch=master)](https://coveralls.io/github/jclem/base62_uuid?branch=master)\n\nA library for generating 22-byte-length, Base62-encoded v4 UUIDs.\n\nUUIDs are great for use as primary keys in relational databases, but they don't look great in URLs. This library makes it easy to generate, encode, and decode Base62 v4 UUIDs that have a guaranteed length of 22 bytes. That way, rather than URLs that look like:\n\n```\nhttps://example.com/widgets/7af42354-0835-475f-adb5-15fc893526e1\n```\n\nYou can have a shorter and friendlier looking URL like:\n\n```\nhttps://example.com/widgets/3k0dNymf72EzlHEkZLwjhZ\n```\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nas:\n\n  1. Add `base62_uuid` to your list of dependencies in `mix.exs`:\n    \n     ```elixir\n     def deps do\n       [{:base62_uuid, \"~\u003e 2.0.0\"}]\n     end\n     ```\n\n  2. Ensure `base62_uuid` is started before your application:\n\n     ```elixir\n     def application do\n       [applications: [:base62_uuid]]\n     end\n     ```\n\n## Usage\n\n### Generate a Base62-encoded UUID\n\n```elixir\niex\u003e Base62UUID.generate()\n\"5rljkyCY7vXDv2bPAnCQdL\"\n```\n\n### Encode a UUID to Base62\n\n```elixir\niex\u003e Base62UUID.encode(\"7af42354-0835-475f-adb5-15fc893526e1\")\n{:ok, \"3k0dNymf72EzlHEkZLwjhZ\"}\n```\n\n### Decode a Base62-encoded UUID\n\n```elixir\niex\u003e Base62UUID.decode(\"3k0dNymf72EzlHEkZLwjhZ\")\n{:ok, \"7af42354-0835-475f-adb5-15fc893526e1\"}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjclem%2Fbase62_uuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjclem%2Fbase62_uuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjclem%2Fbase62_uuid/lists"}