Skip to content

CHANID is a compact and robust utility for generating unique identifiers in JavaScript and TypeScript.

License

Notifications You must be signed in to change notification settings

chanmyaemaung/chanid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHANID (Chan Lay ID)

npm version License npm downloads Bundle Size TypeScript Code Style: Prettier Contributions Welcome

CHANID is a minimalistic and efficient utility for generating unique identifiers in JavaScript and TypeScript. It can be seamlessly integrated into your projects, whether you're working with vanilla JavaScript or taking advantage of TypeScript's static typing.

Table of Contents

Installation

You can install CHANID via npm:

npm install chanid

Usage

CHANID is very easy to use. Simply import the module and call the function to generate a unique identifier.

// Import the CHANID function from the module
const chanid = require('chanid');

// Generate a unique identifier
const uniqueID = chanid();

console.log(uniqueID);

Note: If you are using TypeScript, you can use the import statement instead:

// Import the CHANID function from the module
import chanid from 'chanid';

// Generate a unique identifier
const uniqueID = chanid();

console.log(uniqueID);

Features

Generates unique identifiers based on the UUID format. Works in both JavaScript and TypeScript environments.

CDN Usage

You can also include CHANID directly in your HTML file using a CDN:

<!-- Latest version from jsDelivr (ECMAScript module) -->
<script type="module">
  import chanid from 'https://cdn.jsdelivr.net/npm/chanid@1.2.6/dist/chanid.min.mjs';

  const uniqueID = chanid();
  console.log(uniqueID);
</script>

<!-- Latest version from jsDelivr (Minified script) -->
<script nomodule src="https://cdn.jsdelivr.net/npm/chanid@1.2.6/dist/chanid.min.js"></script>

Contributing

If you would like to contribute to CHANID, feel free to submit a pull request or open an issue.

License

This project is licensed under the ISC License - see the LICENSE.md file for details.

About

CHANID is a compact and robust utility for generating unique identifiers in JavaScript and TypeScript.

Topics

Resources

License

Stars

Watchers

Forks