Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dasch/ulid
ULID implementation in Elm.
https://github.com/dasch/ulid
Last synced: about 16 hours ago
JSON representation
ULID implementation in Elm.
- Host: GitHub
- URL: https://github.com/dasch/ulid
- Owner: dasch
- Created: 2019-11-08T14:15:57.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-08T19:24:41.000Z (over 4 years ago)
- Last Synced: 2024-11-30T13:27:14.459Z (about 1 month ago)
- Language: Elm
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ULIDs in Elm
This package implements the [ULID specification](https://github.com/ulid/spec) for generating universally unique 128 bit identifiers.
Benefits of ULID, per the spec:
* 128-bit compatibility with UUID
* 1.21e+24 unique ULIDs per millisecond
* Lexicographically sortable!
* Canonically encoded as a 26 character string, as opposed to the 36 character UUID
* Uses Crockford's base32 for better efficiency and readability (5 bits per character)
* Case insensitive
* No special characters (URL safe)
* Monotonic sort order (correctly detects and handles the same millisecond)```elm
import Ulidtype alias Model =
{ idGenerator : Ulid.Generator
, ...
}type Msg
= GotUlid String
```