https://github.com/uasi/inko-uuid
A UUID generator for Inko.
https://github.com/uasi/inko-uuid
Last synced: 3 months ago
JSON representation
A UUID generator for Inko.
- Host: GitHub
- URL: https://github.com/uasi/inko-uuid
- Owner: uasi
- License: mpl-2.0
- Created: 2023-10-29T02:55:09.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-17T15:19:46.000Z (5 months ago)
- Last Synced: 2025-04-09T21:50:46.141Z (3 months ago)
- Language: Makefile
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# inko-uuid
A UUID generator for the Inko programming language.
## Examples
import std.rand (Random)
import uuid (Uuid)Uuid.nil.to_string # => 00000000-0000-0000-0000-000000000000
Uuid.max.to_string # => ffffffff-ffff-ffff-ffff-ffffffffffff
Uuid.new_v4.to_string # => 53c3abd9-c092-41e5-af24-282645dc2f5f
Uuid.new_v7.to_string # => 018b794f-4e27-7fd6-81e1-ce1ba94a8783let bytes = Random.new.bytes(16)
Uuid.v8_from_bytes(bytes) # => 4a850836-de34-8153-8c01-521c709a2edf