https://github.com/bitwalker/uniq_compat
A compatibility shim for ::elixir_uuid when used with :uniq
https://github.com/bitwalker/uniq_compat
Last synced: about 1 year ago
JSON representation
A compatibility shim for ::elixir_uuid when used with :uniq
- Host: GitHub
- URL: https://github.com/bitwalker/uniq_compat
- Owner: bitwalker
- License: apache-2.0
- Created: 2021-06-09T15:48:29.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-08-26T16:05:25.000Z (over 3 years ago)
- Last Synced: 2025-03-21T13:12:40.517Z (about 1 year ago)
- Language: Elixir
- Size: 15.6 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# uniq_compat
This project provides a compatibility shim which allows you to replace all uses of
`:elixir_uuid` in your project with `:uniq` without having to make any code changes
to your existing code.
See the [Uniq docs](https://hexdocs.pm/uniq) for more information on that project,
as well as the migration process.
## Installation
To use this package properly, you need to override `:elixir_uuid` with `:uniq_compat`,
which looks like so:
```elixir
def deps do
[
{:elixir_uuid, "~> 0.1", hex: :uniq_compat, override: true}
]
end
```
This overrides the use of `:elixir_uuid` in your dependency tree with `:uniq_compat`.
Internally, `:uniq_compat` shims the `UUID` module to delegate to `Uniq.UUID` while
preserving the original behaviour of things like `UUID.info/1`.