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

curse-script

v1.0.5

Published

A JavaScript obfuscator that converts code into cursed spell-like syntax

Readme

Curse Script

Curse Script

🔗 Showcase and Introduction Page

A JavaScript obfuscator that converts code into cursed spell-like syntax.

Installation

npm install curse-script
# or
pnpm add curse-script

Usage

As a Library

import { curse } from 'curse-script';

// Default: uses Runic characters
const cursed = curse('console.log("Hello World")');
console.log(cursed);

// Use Old Persian characters
const cursedPersian = curse('console.log("Hello World")', { characterSet: 'oldPersian' });
console.log(cursedPersian);

// Use emoji characters
const cursedEmoji = curse('console.log("Hello World")', { characterSet: 'emoji' });
console.log(cursedEmoji);

// Use custom character set (Greek alphabet)
const customChars = ['α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'ι', 'κ', 'λ', 'μ', 'ν', 'ξ', 'ο', 'π', 'ρ', 'σ', 'τ', 'υ', 'φ', 'χ', 'ψ', 'ω'];
const cursedGreek = curse('console.log("Hello World")', { characterSet: customChars });
console.log(cursedGreek);

// No character replacement (Latin A-X)
const cursedLatin = curse('console.log("Hello World")', { characterSet: 'none' });
console.log(cursedLatin);

Interactive Dev Mode

Run the interactive converter to test your scripts:

pnpm run dev

This will start an interactive prompt where you can enter any JavaScript code and see it converted to curse-script format in real-time.

Example session:

Enter script to convert (or "exit" to quit): console.log("hi?")

Original:
console.log("hi?")

Cursed Output:
ᚠ='',ᚡ=!ᚠ+ᚠ,ᚢ=!ᚡ+ᚠ,ᚣ=ᚠ+{},ᚤ=ᚡ[ᚠ++],ᚥ=ᚡ[ᚦ=ᚠ],ᚧ=++ᚦ+ᚠ,ᚨ=ᚣ[ᚦ+ᚧ],ᚩ=ᚡ[(ᚨ+=ᚣ[ᚠ]+(ᚡ.ᚢ+ᚣ)[ᚠ]+ᚢ[ᚧ]+ᚤ+ᚥ+ᚡ[ᚦ]+ᚨ+ᚤ+ᚣ[ᚠ]+ᚥ)][ᚨ],ᚪ=ᚣ[ᚦ+ᚦ+ᚧ],ᚫ=ᚠ+/\\/,ᚬ=ᚫ[ᚦ],ᚭ='"',ᚮ=((ᚦ-ᚦ)+ᚪ)[ᚦ-ᚦ],ᚯ=(ᚠ+ᚪ)[ᚦ-ᚦ],ᚰ=(ᚦ+ᚪ)[ᚦ-ᚦ],ᚱ=(ᚧ+ᚪ)[ᚦ-ᚦ],ᛦ=((ᚧ+ᚦ-ᚠ)+ᚪ)[ᚦ-ᚦ],ᚳ=((ᚧ+ᚦ)+ᚪ)[ᚦ-ᚦ],ᚴ=((ᚧ*ᚦ)+ᚪ)[ᚦ-ᚦ],ᚵ=((ᚧ*ᚦ+ᚠ)+ᚪ)[ᚦ-ᚦ],ᚶ=((ᚧ*ᚧ-ᚠ)+ᚪ)[ᚦ-ᚦ],ᛊ=((ᚧ*ᚧ)+ᚪ)[ᚦ-ᚦ],Y=ᚥ+ᚡ[ᚧ]+ᚤ+ᚡ[ᚦ]+ᚥ+(ᚡ.ᚢ+ᚣ)[ᚠ]+ᚪ,ᚩ(ᚣ[ᚦ+ᚧ]+ᚣ[ᚠ]+(ᚡ.ᚢ+ᚣ)[ᚠ]+ᚢ[ᚧ]+ᚣ[ᚠ]+ᚢ[ᚦ]+ᚡ[ᚧ]+ᚩ(Y+ᚭ+ᚬ+ᚡ[ᚠ+ᚠ]+ᚮ+ᚮ+ᚰ+ᚡ[ᚧ]+ᚭ)()+ᚢ[ᚦ]+ᚣ[ᚠ]+ᚩ(Y+ᚭ+ᚬ+ᚡ[ᚠ+ᚠ]+ᚮ+ᚮ+ᚴ+ᚵ+ᚭ)()+ᚩ(Y+ᚭ+ᚬ+ᚡ[ᚠ+ᚠ]+ᚮ+ᚮ+ᚰ+ᚶ+ᚭ)()+ᚩ(Y+ᚭ+ᚬ+ᚡ[ᚠ+ᚠ]+ᚮ+ᚮ+ᚰ+ᚵ+ᚭ)()+ᚩ(Y+ᚭ+ᚬ+ᚡ[ᚠ+ᚠ]+ᚮ+ᚮ+ᚴ+ᚶ+ᚭ)()+ᚩ(Y+ᚭ+ᚬ+ᚡ[ᚠ+ᚠ]+ᚮ+ᚮ+ᚴ+ᛊ+ᚭ)()+ᚩ(Y+ᚭ+ᚬ+ᚡ[ᚠ+ᚠ]+ᚮ+ᚮ+ᚱ+ᚢ[ᚦ-ᚦ]+ᚭ)()+ᚩ(Y+ᚭ+ᚬ+ᚡ[ᚠ+ᚠ]+ᚮ+ᚮ+ᚰ+ᚵ+ᚭ)()+ᚩ(Y+ᚭ+ᚬ+ᚡ[ᚠ+ᚠ]+ᚮ+ᚮ+ᚰ+ᛊ+ᚭ)())();

Type exit or quit to close the interactive session.

API

curse(source: string, options?: CurseOptions): string

Converts JavaScript code into curse-script format.

Parameters:

  • source: The JavaScript code to convert
  • options.includePrelude: Whether to include the prelude (default: true)
  • options.characterSet: Character set to use for obfuscation (default: 'runic')
    • 'runic': Use Runic characters (ᚠ-ᚷ)
    • 'oldPersian': Use Old Persian cuneiform (𐎠-𐎷)
    • 'emoji': Use emoji characters (😀-😗)
    • 'none': No character replacement (use Latin A-X)
    • string[]: Custom array of at least 24 characters

Returns: The cursed script as a string

Examples:

// With Runic characters (default)
curse('alert(1)'); // ᚠ='',ᚡ=!ᚠ+ᚠ,...

// With Old Persian characters
curse('alert(1)', { characterSet: 'oldPersian' }); // 𐎠='',𐎡=!𐎠+𐎠,...

// With emoji characters
curse('alert(1)', { characterSet: 'emoji' }); // 😀='',😁=!😀+😀,...

// With custom characters
const customChars = ['α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'ι', 'κ', 'λ', 'μ', 'ν', 'ξ', 'ο', 'π', 'ρ', 'σ', 'τ', 'υ', 'φ', 'χ', 'ψ', 'ω'];
curse('alert(1)', { characterSet: customChars }); // α='',β=!α+α,...

// With no character replacement
curse('alert(1)', { characterSet: 'none' }); // A='',B=!A+A,...

Character Set Requirements

When providing a custom character set:

  • Must contain at least 24 unique characters
  • Characters will map to variables A-X in order
  • Can use any Unicode characters including emoji, symbols, or letters from any script

Exported Constants

The package exports the built-in character sets for reference:

import { RUNIC_CHARS, OLD_PERSIAN_CHARS, EMOJI_CHARS } from 'curse-script';

console.log(RUNIC_CHARS);       // ["ᚠ", "ᚡ", "ᚢ", ...]
console.log(OLD_PERSIAN_CHARS); // ["𐎠", "𐎡", "𐎢", ...]
console.log(EMOJI_CHARS);       // ["😀", "😁", "😂", ...]

// You can also use them as a base for custom modifications
const customSet = [...RUNIC_CHARS];
customSet[0] = '🔥'; // Replace first character

Development

# Build the package
pnpm run build

# Run tests
pnpm run test

# Watch mode
pnpm run watch

License

MIT