@kilann/guid-generator
TypeScript icon, indicating that this package has built-in type declarations

1.3.3 • Public • Published

GUID_generator

A utility to generate Comb GUIDs

Installation

npm install @kilann/guid-generator
yarn add @kilann/guid-generator
pnpm add @kilann/guid-generator

Why ?

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.

Usage

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);

License

MIT

Package Sidebar

Install

npm i @kilann/guid-generator

Weekly Downloads

60

Version

1.3.3

License

MIT

Unpacked Size

12.2 kB

Total Files

22

Last publish

Collaborators

  • kilann