Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 619 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 619 Bytes

gleam_uuid

This is a fork of https://gitlab.com/greggreg/gleam_uuid

Generate and decode UUIDs in Gleam.

Spec conformant UUID v1, v3, v4, and v5 generation.

Spec conformant UUID decoding for all versions and variants.

Documentation

https://hexdocs.pm/gleam_uuid/

Quick start

in your rebar.config deps section add:

{gleam_uuid, "~> 0.1"}
import gleam_uuid

// Generation
> gleam_uuid.v4_string()
"f7e321c7-4a4b-4287-a8b8-1ae35b5538ce"

// Decoding
> "f7e321c7-4a4b-4287-a8b8-1ae35b5538ce"
    |> gleam_uuid.from_string()
    |> result.map(gleam_uuid.version)
Ok(gleam_uuid.V4)