neouuid 0.1.0 copy "neouuid: ^0.1.0" to clipboard
neouuid: ^0.1.0 copied to clipboard

Fast and idiomatic UUIDs (Universally Unique Identifiers) in Dart.

neouuid #

Fast and idiomatic UUIDs (Universally Unique Identifiers) in Dart.

Binary on pub.dev Code coverage Github action status Dartdocs Style guide

This library decodes and generates UUIDs, 128-bits represented as 32 hexadecimal digits:

ba6eb330-4f7f-11eb-a2fb-67c34e9ac07c

Usage #

The generator supports three different UUID modes:

  • v1: Guaranteed unique, unless generated from the same computer at the same time.
  • v4: Completely random, 2^128 possible combinations make it almost impossible to repeat.
  • v5: Non-random, generated by providing an input and namespace string.

Performance & Compatibility #

This package is intended to work identically and well in both the standalone Dart VM, Flutter, and web builds of Dart and Flutter (both in DDC and Dart2JS). Contributions are welcome to add special-cased that improves performacne for a specific platform (as long as there is a fallback for other platforms).

Benchmarks #

Package Equivalent to Uuid.parse
neouuid 01.55us
uuid 15.66us
uuid_type 00.78us

As of 2022-07-22 on a Macbook Pro (M1), uuid_type is ~2x faster:

dart benchmark/neouuid_parse.dart
dart benchmark/uuid_parse.dart
dart benchmark/uuid_type_parse.dart

This is mainly due to this package using int.parse instead of building up a byte buffer from hexadecimel character matches.

Contributing #

Some inspiration:

2
likes
140
pub points
0%
popularity

Publisher

verified publisherneodart.dev

Fast and idiomatic UUIDs (Universally Unique Identifiers) in Dart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

meta

More

Packages that depend on neouuid