npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

idgenie

v1.1.1

Published

A magical and flexible ID generator with support for unique IDs, date/time, prefixes, suffixes, and more.

Readme

idgenie

A magical and flexible ID generator with support for unique IDs, date/time, prefixes, suffixes, and more.

npm Node npm downloads license

Installation

npm install idgenie
yarn add idgenie
pnpm add idgenie

Using IdGenie from a CDN

IdGenie is available on jsDelivr and unpkg, so you can use it directly in the browser without installing via npm. Just include the script, and idgenie will be available globally:

<!-- Latest version -->
<script src="https://cdn.jsdelivr.net/npm/idgenie/dist/idgenie.umd.min.js"></script> or
<script src="https://unpkg.com/idgenie/dist/idgenie.umd.min.js"></script>

<!-- Or pin to a specific version -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/idgenie.umd.min.js"></script> or
<script src="https://unpkg.com/[email protected]/dist/idgenie.umd.min.js"></script>

<script>
  const id = idgenie.uniqueId({ length: 20, prefix:'manikant' });
  console.log(id);
</script>

Usage After Installation

Importing

// ES Module
import { uniqueId } from "idgenie";

// CommonJS
const { uniqueId } = require("idgenie");

Basic Example

// Generate Default unique id

const id = uniqueId();
console.log(id); // Outputs unique id string


// Generate Custom unique id using options parameters --->

const customId = uniqueId({length: 20, prefix:'mani', suffix:'kumar'});
// It will generate unique id of length 20 + prefix + suffix

const customId = uniqueId({mode:'uuid'});
// It will generate unique uuid

const customId = unqiueId({randomLength: true, alphabet:'manikant123', includeDate: true, casing:'upper', secure: true, separator:'#'});
// It will generate random length of custom unique id between 8-36 also it'll take my 'manikant123' alphabet to generate id and include date, separator('#') where need and
// generate id securely using crypto and give Unique id in Uppercase as passed casing 'upper'

console.log(customId); // Outputs custom id string 

// You can use in the same way options as your needs else use without it for just id

API

uniqueId(options)

Generates a unique ID with flexible options.

| Option | Type | Default | Description | | ----------------- | ------- | ------------ | ------------------------------------------ | | length | number | 8 | Length of generated ID | | randomLength | boolean | false | Randomize length between 8-36 if set true | | prefix | string | '' | Adds a prefix to the generated ID | | suffix | string | '' | Adds a suffix to the generated ID | | includeDate | boolean | false | Include localized date string | | includeTime | boolean | false | Include localized time string | | dateLocale | string | 'en-IN' | Locale used for date formatting | | timeLocale | string | 'en-IN' | Locale used for time formatting | | dateFormatOptions | object | { year: "numeric", month: "2-digit", day: "2-digit" } | Intl.DateTimeFormat options for date | | timeFormatOptions | object | { hour: "2-digit", minute: "2-digit", second: "2-digit" } | Intl.DateTimeFormat options for time | | alphabet | string | Alphanumeric [A-Za-z0-9] | Characters used for randomness | | casing | string | 'mixed' | Casing style: 'lower', 'upper', or 'mixed' | | separator | string | '' | Separator string between different parts. For Example '@' or '#' etc. | | secure | boolean | false | Use cryptographically secure randomness | | mode | string | 'random' | Mode of generation, 'random' or 'uuid' | | counter | boolean | false | Append a counter value | | timestamp | boolean | false | Append timestamp string |

License

MIT