typeid 1.0.1 copy "typeid: ^1.0.1" to clipboard
typeid: ^1.0.1 copied to clipboard

A spec conformant implementation of the TypeID standard. TypeIDs are K-sortable, globally unique identifier inspired by Stripe IDs

Dart TypeID #

A spec conformant implementation of typeid in Dart.

GitHub License GitHub Actions Workflow Status Pub Version Pub Publisher Pub Points

Note

This repo contains the typeid repo as a submodule to reflect which version of the spec has been implemented and to maintain a single source of truth for test vectors

Usage #

This package is available and can be consumed via pub.dev

ID Generation #

import 'package:typeid/typeid.dart';

void main() {
  final id = TypeId.generate('user');
  print(id);
}

Decoding #

import 'package:typeid/typeid.dart';

void main() {
  final id = TypeId.decode('user_01hsq6r6amekxrefpecdfp561f');
  
  print(decoded.prefix);
  print(decoded.suffix);
  print(decoded.uuid.version);
}
5
likes
160
pub points
62%
popularity

Publisher

verified publishertbd.website

A spec conformant implementation of the TypeID standard. TypeIDs are K-sortable, globally unique identifier inspired by Stripe IDs

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

uuid

More

Packages that depend on typeid