Skip to content
This repository has been archived by the owner on Jan 22, 2023. It is now read-only.
/ d-ulid Public archive

ULID (Universally Unique Lexicographically Sortable Identifier) generator and parser for Dart.

License

Notifications You must be signed in to change notification settings

JonasSchubert/d-ulid

Repository files navigation



ulid


Dart Ulid

Unit test coverage

Support me

ULID (Universally Unique Lexicographically Sortable Identifier) generator and parser for Dart.

Refer the ULID spec for a more detailed ULID specification.

Usage

ULID generation examples:

import "package:ulid/ulid.dart";

final Ulid randomUlid = new Ulid();
final Ulid definedUlid = new Ulid(milliseconds: 1557942647);
final Ulid fromStringUlid = new Ulid.fromString("015c8e52-e8c9-8070-3709-877e5de58402");

ULID parsing examples:

import "package:ulid/ulid.dart";

var ulidString = "00005cdc-5177-0beb-c121-800c33c35260"

var isValid = Ulid.isValid(ulidString);
var milliseconds = new Ulid.fromString(ulidString)toMilliseconds();

Prior Projects

Contributors

JonasSchubert
Jonas Schubert

License

d-ulid is distributed under the MIT license. See LICENSE for details.

MIT License

Copyright (c) 2019 - 2020 Jonas Schubert

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

ULID (Universally Unique Lexicographically Sortable Identifier) generator and parser for Dart.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages