custom_user_id

Crates.iocustom_user_id
lib.rscustom_user_id
version0.0.3
sourcesrc
created_at2022-10-15 05:41:51.369088
updated_at2022-10-15 05:58:01.769717
descriptionGenerates a random id with string of your choice appended or prepended to it
homepagehttps://github.com/bocarw121/custom_user_id.git
repositoryhttps://github.com/bocarw121/custom_user_id.git
max_upload_size
id688750
size4,411
Bocar (bocarw121)

documentation

README

custom_user_id

Generates a random id with a string of your choice appended or prepended to it. This is useful if you want to track users across multiple devices and platforms. This crate uses uuid under the hood with js enabled so it can be used for WebAssembly.

Usage

use custom_user_id::generate_id;

// Set the second argument to true to prepend the id with the given string
generate_id("my_app", true) // my-app-155abb84-81d5-4f36-9220-ef664e785195

// Set second argument to false to append the id with the given string
generate_id("my_app", false) // 7929654a-21a9-4dc5-9ef9-e84a49e393ab-my-app

Commit count: 1

cargo fmt