Skip to content

Commit 51ca149

Browse files
committed
docs: update readme
1 parent cfbd918 commit 51ca149

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
![ci](https://github.com/temporal-id/tempoid-dart/actions/workflows/ci.yml/badge.svg)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
66

7+
IDs with temporal ordering and short length.
8+
79
A library to generate URL-friendly, unique, and short IDs that are sortable by time. Inspired by nanoid and UUIDv7.
810

911
See [tempoid.dev](https://tempoid.dev) for more information.
@@ -23,6 +25,11 @@ Example ID:
2325
Time Random
2426
```
2527

28+
## Collisions
29+
30+
- **Same millisecond**: There can be only a collision if two IDs are generated in the same millisecond.
31+
- **Low probability**: Even if two IDs are generated in the same millisecond, the probability of a collision is low: 1 in 200,000,000,000,000.
32+
2633
## Getting Started
2734

2835
```yaml
@@ -69,9 +76,12 @@ making it easy to select and copy.
6976
You can change the alphabet by passing the `alphabet` parameter.
7077

7178
```dart
79+
// use a different alphabet
80+
TempoId id2 = TempoId.generate(alphabet: Alphabet.base64);
81+
82+
// or create a custom alphabet
7283
Alphabet alphabet = Alphabet('ABCDEF');
7384
TempoId id1 = TempoId.generate(alphabet: alphabet);
74-
TempoId id2 = TempoId.generate(alphabet: Alphabet.base64);
7585
```
7686

7787
## License

0 commit comments

Comments
 (0)