TSFoster/elm-uuid/1.0.0

NOTE: the latest version is 4.3.1

UUID

A module defining UUIDs in the general, and providing functions for encoding, decoding and formatting UUIDs.

type alias UUID version variant =
UUID version variant

Opaque type to encapsulate UUIDs. Uses phantom types to provide information about version and variant.

type alias Version4 =
Version4

Used to denote version of version 4 UUIDs.

type alias Variant1 =
Variant1

Used to denote variation of variation 1 UUIDs.

type alias Variant2 =
Variant2

Used to denote variation of variation 2 UUIDs.

type alias Nil =
Nil

Used to denote version and variant of the nil UUID.

nil : UUID Nil Nil

The nil UUID. This is the special UUID "00000000-0000-0000-0000-000000000000".

JSON

encode : UUID version variant -> Value

Encode a UUID of any version or variant as a JSON string.

decoder : Decoder (UUID version variant)

Decodes a UUID of any version or variant from a JSON string.

Formatting

canonical : UUID version variant -> String
microsoftGUID : UUID version variant -> String
urn : UUID version variant -> String