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

@neabyte/wordler

v0.1.0

Published

Word scrambler based on anagram and permutation.

Readme

Wordler Module type: Deno/ESM npm version JSR CI License

Word scrambler engine based on anagram and permutation.

Installation

Deno (JSR):

deno add jsr:@neabyte/wordler

npm:

npm install @neabyte/wordler

Usage

The Wordler engine provides several modes of operation to find the exact permutations you need.

1. Basic Scrambling (Anagrams)

By default, the engine works as an anagram generator. It will find all possible permutations using all characters provided in the input string.

import Wordler from '@neabyte/wordler'

const results = Wordler.scramble('dog')
// Results: 'dog', 'dgo', 'odg', 'ogd', 'gdo', 'god'

2. Wildcards for Discovery

Use the * character to represent any letter from a to z. This is useful for discovering words when you only have partial information.

// Find 3-letter words starting with 'a' and 'b'
const results = Wordler.scramble('ab*', { limit: 5 })
// Results: 'aba', 'abb', 'abc', 'abd', 'abe'

3. Character Sets (Fixed Position)

Brackets [abc] allow you to specify a set of allowed characters for a single position. The engine will pick exactly one character from the set.

// Starts with a vowel, followed by 'lc'
const results = Wordler.scramble('[aeiou]lc', { mode: 'template' })
// Results: 'alc', 'elc', 'ilc', 'olc', 'ulc'

4. Template Mode vs Scramble Mode

  • Scramble Mode (Default): Permutes all character slots. It treats your input as a "bag of slots" and tries every possible order.
  • Template Mode: Keeps each character/slot in its specific index. Ideal for fixed-layout pattern discovery.
// Template mode keeps 'fixed' at the end
const results = Wordler.scramble('***fixed', { mode: 'template' })

5. Automatic Deduplication

The engine internally uses a Set to ensure all returned permutations are unique, even if your input contains duplicate characters.

const results = Wordler.scramble('banana')
// No duplicate 'banana' entries in the result set

API Reference

Wordler.scramble(letters, options?)

Generates unique letter permutations from input.

Parameters:

  • letters: string - Input letters. Supports special syntax:
    • *: Wildcard (a-z)
    • [abc]: Character set (one from the list)
  • options: WordlerOptions - Optional configuration:
    • min: number: Minimum word length (Scramble mode only)
    • max: number: Maximum word length (Scramble mode only)
    • limit: number: Maximum number of results
    • mode: 'scramble' | 'template': Execution strategy

Returns: WordlerResult[] - Array of generated permutations.

Types:

interface WordlerOptions {
  readonly min?: number // Minimum word length
  readonly max?: number // Maximum word length
  readonly limit?: number // Results count limit
  readonly mode?: 'scramble' | 'template'
}

interface WordlerResult {
  readonly word: string // Generated permutation
  readonly length: number // Word length
}

Safety Features

For inputs exceeding 12 characters, a limit of 1,000,000 or less is required to prevent memory exhaustion.

License

This project is licensed under the MIT license. See the LICENSE file for more info.