bento-kit 0.1.1

A bento box of common Rust utilities: id generation, timing, masking
Documentation
//! 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.

mod nanoid;
mod random;
mod session;
mod uuid;

pub use self::nanoid::{nanoid, nanoid_with_alphabet, nanoid_with_len, DEFAULT_NANOID_LEN};
pub use self::random::{random_int, random_string};
pub use self::session::{
    generate_session_id, make_db_key, make_uid_postfix, make_user_id, parse_user_id,
    set_session_prefix, UserId,
};
pub use self::uuid::{uuid_v4, uuid_v4_simple, uuid_v7, uuid_v7_simple};