1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! ID generation — Rust port of [`du-node-utils/lib/id.js`](https://github.com/imcooder/du-node-utils/blob/main/lib/id.js).
//!
//! The function names track the Node original (snake-cased to match Rust
//! conventions). UUIDs and nanoids are exposed on top as Rust-side
//! conveniences.
//!
//! ## Node parity
//!
//! | Node | Rust |
//! |-------------------------------|------------------------------------|
//! | `id.makeUUID(false)` | [`uuid_v4`] |
//! | `id.makeUUID(true)` | [`uuid_v4_simple`] |
//! | `id.randomInt(min, max)` | [`random_int`] |
//! | `id.randomString(len)` | [`random_string`] |
//! | `id.makeUidPostfix()` | [`make_uid_postfix`] |
//! | `id.makeUserId(a, u, c)` | [`make_user_id`] |
//! | `id.parseUserid(s)` | [`parse_user_id`] |
//! | `id.makeDbKey(uid)` | [`make_db_key`] |
//! | `id.setSessionPrefix(p)` | [`set_session_prefix`] |
//! | `id.generateSessionId()` | [`generate_session_id`] |
//!
//! Rust additions (no Node equivalent):
//!
//! - [`uuid_v7`] / [`uuid_v7_simple`] — time-ordered UUIDs.
//! - [`nanoid`] / [`nanoid_with_len`] / [`nanoid_with_alphabet`] — short URL-safe IDs.
pub use ;
pub use ;
pub use ;
pub use ;