A utility to generate Comb GUIDs
npm install @kilann/guid-generator
yarn add @kilann/guid-generator
pnpm add @kilann/guid-generator
This package is a simple utility to generate Comb GUIDs. A Comb GUID is a GUID that is generated from a timestamp and a UUID.
It make it sortable and unique.
You can pass in a prefix and/or suffix to the function, this will help you to identify the Comb GUID.
Fully without dependencies.
import { GUIDGenerator } from "@kilann/guid-generator";
const guid = GUIDGenerator();
// you can also pass in a prefix and/or suffix
const guid = GUIDGenerator("prefix", "suffix");
console.log(guid);
You can also create UUIDs with a prefix and/or suffix
import { UUIDGenerator } from "@kilann/guid-generator";
const uuid = UUIDGenerator();
const uuid = UUIDGenerator("prefix", "suffix");
console.log(uuid);
MIT