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

@scelles/unique-names-generator

v0.1.0

Published

A generic, type-safe, and deterministic pseudonym generator in TypeScript

Readme

@scelles/unique-names-generator

A generic, type-safe, and deterministic pseudonym generator in TypeScript.

Inspired by unique-names-generator with a clean separation between code and data (issue #82). Dictionary data comes from unique-names-data, a Frictionless Data Package.

Features

  • Dictionary-agnostic — accepts any ordered array of string[][]
  • Deterministic — seeded PRNG for reproducible name sequences
  • Type-safe — full TypeScript support with exported types
  • Data Package integration — uses the datapackage library
  • Tree-shakable dictionaries — built-in word lists as constants
  • Multiple styleslowercase, capital, uppercase
  • Batch generation — with uniqueness constraints and exclusion sets

Installation

npm install @scelles/unique-names-generator

Quick Start

import { generateName, generateNames } from "@scelles/unique-names-generator";
import {
  ADJECTIVES,
  COLORS,
  ANIMALS,
} from "@scelles/unique-names-generator/dictionaries";

// Generate a single name
const name = generateName([ADJECTIVES, COLORS, ANIMALS]);
// => "Swift Emerald Falcon"

// Deterministic with seed
const name2 = generateName([ADJECTIVES, COLORS, ANIMALS], { seed: 42 });
// Always returns the same name for seed 42

// Batch generation
const names = generateNames([ADJECTIVES, COLORS, ANIMALS], 5, {
  seed: 42,
  unique: true,
});

API

generateName(dictionaries, options?)

Generate a single random name by picking one word from each dictionary.

Parameters:

  • dictionaries: string[][] — ordered array of word lists
  • options.separator?: string — word separator (default: " ")
  • options.style?: "lowercase" | "capital" | "uppercase" — formatting (default: "capital")
  • options.seed?: number | string — seed for deterministic output

generateNames(dictionaries, n, options?)

Generate n names.

Parameters:

  • dictionaries: string[][] — ordered array of word lists
  • n: number — number of names to generate
  • options.unique?: boolean — ensure all names are unique (default: true)
  • options.exclude?: Set<string> — names to exclude from generation
  • Plus all generateName options

Throws: NamespaceExhaustedError when all combinations are exhausted.

loadDictionary(pathOrUrl, resourceName)

Load a dictionary from a Frictionless Data Package descriptor.

Parameters:

  • pathOrUrl: string — path or URL to a datapackage.json
  • resourceName: string — name of the resource to extract
import { loadDictionary } from "@scelles/unique-names-generator";

const adjectives = await loadDictionary(
  "https://raw.githubusercontent.com/s-celles/unique-names-data/main/datapackage.json",
  "adjectives",
);

Built-in Dictionaries

Available via @scelles/unique-names-generator/dictionaries:

| Constant | Description | | ------------ | -------------------------------------------- | | ADJECTIVES | General adjectives (traits, qualities) | | COLORS | Color names | | ANIMALS | Animal species | | CELESTIAL | Space and astronomy terms | | NATURE | Natural elements and phenomena | | SCIENCE | Scientific terms | | NUMBERS | Numeric strings (0–99) | | NATO | NATO phonetic alphabet | | NOUNS | Union of animals, celestial, science, nature |

Related Projects

License

MIT