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 🙏

© 2024 – Pkg Stats / Ryan Hefner

zalgofy

v1.0.1

Published

A package to add random diacritics to a string of text.

Downloads

9

Readme

About

Zalgofy is an ES compatible library that renders text in with the classic "zalgo" pattern. Basically it will transform text that looks like this:

Random text 1234

into something that looks like this:

̴̘̼̿R̳ͯ͂͢ȁ̙́ń̵̪̇d̦̟͛͟ó̷͕m ̰̲͑̽t̷̲̀͆ė͓͊͘x̶̬ͣ̚t ͓ͦͥ͝1̻̯̄͞2͍̗̎3̜͎͑͞4

Install

In your node project open a terminal within the project directory and type:

npm install zalgofy

Then in your project you can import it like:

import zalgofy from 'zalgofy';

...

console.log(zalgofy('Random Text 1234'));

which should output

̴̄̕ͅȒ̶̖͘a̲ͬͬ̕ṉ̻́d̴ͤ̃͘o̰̗͂̈m ̶͉̤̋țͮ͠ͅe̸̞͌̈x͖͊ͯ͞t ̭́ͩͭ1͈͌́̇2̝͉ͭ̕3̶ͥ̂ͅ4

Details

Each time you run zalgofy() the diacritical marks will look a bit different, they are randomly applied. You can pass a configuration object into zalgofy() to have more control over the number of diacritics applied to the letters.

let config = {
    maxAccentsUp: 3,
    maxAccentsDown: 3,
    maxAccentsMiddle: 2,
    maxTotalAccents: 3
};

Diacritical marks will either be above the letter, in the middle, or below the letter. On each letter the algorithm will try to place maxTotalAccents number of diacritical marks. The number of marks from the upper group will not exceed maxAccentsUp, similarly for middle and lower groups.

To start getting crazy you wanna do something like this:

let config = {
    maxAccentsUp: 100,
    maxAccentsDown: 100,
    maxAccentsMiddle: 100,
    maxTotalAccents: 100
};

console.log(zalgofy('random text 1234', config));

̸̸̵̸̸̡̢̡̨̧̛̛̛͇͓̠̰̞̤̺͚̺͈̦͎͚͍͈̳̘͔̩̯̺̰̙͖̝͖͈̥̳̹̻̩̘̲̤̭ͨ͑ͬ̇̅̐ͯ̋ͩ̇̉̑̍ͫͧ̌̂ͭ̇̉́̾̌ͫ͑ͧ̿ͤ͋ͨ̋͆̿̍͊̉̍̈́̌ͣ͌͂́ͦ͘̕͢͜͠͝ͅŖ̡̧̨̛̛̛͖̫͈͖̦̰͍̫̺̦̜͕̟̺̘̝͖̼̜̺͈̼̙̤̺͚̰̜̺̳̻͎͇͍̹͚̞͓͈̜͍̐ͦ̈̍ͪ̋̅͌ͣ͋ͦͤ͌̄ͩͤ̋̉̊ͣ͊̽ͪ́ͦ̀̇ͬͮ̃͑̽̾̓̀͛̾̽͌ͫ̕͘͟͜͡͡͡͠͞͞ͅa̵̷̸̶̴̴̶̡̨̢̛̛͓͔͚̦̺͖̝͓͙̫̞̫̤͉͔̠͙̮͇̥̹͈̫̟̟͕͕͙̩̻̺̹̰̲̩̰͉̫̙̟̤͔̮̞̥̐̈́ͯ̃͐͋̐ͫ̌͂̆ͫͯ̅͋̊̌ͬͣ̇̊́̽͛͒̄ͪ̄̈́͛ͫ̀ͩ̊̀́̿̄̕͘͞͡ņ̵̵̴̷̸̵̷̷̴̵̴̶̯̰̙̹͎͖̠̯͉̞̮̬͓̳̪̻̞̹̲̤̪̲͇̭̤̳̫͓̹̙͍̞͚̖̬̼͍̤̀ͭͤ̇̉͌͂̎ͫͧͥ͒̅ͮ͐́͑̄̌̍̂̈́ͭ̄ͥ̑̆̾̂̑ͫ̉̍̃ͪ̈ͨ̐̄ͣ̂͌̕̚͢͟͜͝͝d̴̵̸̡̢̨̨̢͎͙̘͚͓̱͍͙͇̜̻̤̺̟̻̝͖͔̻̻͚̬̼͈̮̰͙̤͔̳̞͈̳̩̱̮̻̍̈́ͩͬͨ̏̓͗ͨ̾ͥͪ̓̍̆͛ͩͬ̈͐̌̄̾̿͆̿̏͆̀̋́́̊̾͂̊ͧͪ̋̅̀͋ͧ̚͜͟͝͞͠͝͝͝ͅͅơ̸̷̡̧̨̡̢̡̡̛̛̼̹̪̙͎̳͔̱̞̤͔̟͉̝͉̲͎̹̲̲̺͖͉̪̪̹̲̰̠̗̻̪̞͓̝͂̐̾͋͌̃̏̃̓ͭ̈́́͛́ͮ͌̈̎ͫ͒̍̈́́ͦͩ̑̃̍̑ͨͧͣ̑͋̓̎̄̎̐͛̂̇̆̿̋̚̕͟͜͟͡͠m ̶̶̷̵̸̡̢̡̢̡̧͙̟͉͕͚̦̥̫͓̟͍͉̖̘̰̠̰̟̳̺̖̜͈̟͓̩͎͔͎̭̞̮̤̙̗͕͖̰̪̙̭̖̗̤̬ͥͫͦ̊̿̓͋ͮͫ͊́̈̐̇́ͭͥͫͨ̂̐̿̋͊̌ͨͧ̿̓̄̈́ͫ́͂ͥ͆ͯ̕̕͜͠͡͞͠t̸̸̴̵̴̷̵̷̴̶̷̨̨͎̮͓̙͕̯̝̝͕̰͚̼̤̞̥̬̪̰̝̻̲̫̪͚̦͖̾͒͌͗̽ͭ̄͛̌͑̏̋͒ͦ̊ͣͨ̊ͣ̑͛ͬ͊͐̎̓͆͂̈̐ͨ̊̂ͦ́͒ͪ̇̑̉ͨ̽͋̊̃ͨͮͮ̿̑́́ͧ̚͘͜͠͝͞ͅͅe̶̷̵̵̴̢̨̨̥͓͎̺͇͖̹͈̱̲͎̤̱̖̘̺̝͙̞͍̠̼͎͍̲̠͇͉͕̞̳̞̞̤͕͎̳̠̥̼̺̥͉͌ͪ͂ͮ̐ͬ̾͛̽̿̇͐ͯ̑̆ͯ̽͊ͯͥ͌̑̀ͩͪ͌͑͗͑̇̂ͬ́̾̐̀͂͑̾̀̂͘͜͢͟͜͠͡͡x̷̸̵̸̵̴̴̸̡͍̱̥̩͕̫̳͔̻̦͓̪̫̪͎͉̩͈̺̻̠̫͙̩̘̰͎̟̫͖͍̳͖̲̜̦̪̬̗̼̻̞̓̄͊͐̓ͪ͂̑̈̑̈́̽̄̑͌͒ͨͨ̍̉ͬ̓̓̃̓͗̿̈́̓ͫ̑ͣ̇̇̍̓̀̕͘͢͟͜͜͜͜͠͠ͅt ̵̸̨̢̨̡̨̛̱̜̖̠̫͔͎͈̩̺͈̭͔̻̯̹̜̤̳̮͖̼̥̝̗̖̝͕̬̜̭͚̗̻̬̳͓̲̫̰͉ͩ̍̄̈͊̊̃ͨ̅̐ͬ͑ͫ̉ͨ͌̆͌̆͌ͬͦͧͬ̅̈́ͯ̏ͥ̅͒ͭ̋̄ͦ̈ͫ͘͟͢͜͢͟͡͡͝͞͞͝ͅͅͅ1̸̸̷̸̸̵̴̸̧̧̢̛̠̲̥̱̩̺͇͚̤͓̤̝̦̹̬̞̠̩̩̱͍͙̯̰̺̙̺͖̦͈͚̭͎̹̰̩̲͖̘̗̑ͩ̈́̉͂́̇̽̌ͥ̃͛ͩ̊ͤ͊̊̍ͬ̓ͩ̃̃ͭ͛ͬ͑ͨͦ̂ͩͨ͛͊̎̈́͌̚̕̕͢͢͜͡͝͠ͅ2̴̸̷̴̸̵̶̵̧̢̧̨̨̭̩͚̖̤̺͚͕͈͙͔̹̤̹͔̼͔̻͈̱̬͎̟͎̯͉̻͉̲͎̭̋̑ͫ͋͑͂͒ͬ̿ͩ͌͒͋̐ͯͪ̑̑ͬ̇͗ͨ̎͑̊̆̐̌͒ͯ̄͂ͬ̈́ͯ͒ͬ̾ͩ̎̀̽ͪ̎̐̐́̍̅̚̕͘͞͠͡3̸̷̧̨̨̢̡̨̞̗̦̘̹͎̼͔̭̟̭̟̩̘͖͉̹̼̦̭̘͈̜͔̟̙̯̙̹̭͔̲͉͎̰̙̜̯͕̭̭ͪͦͥ̆͗̏ͦ̆ͩ̈́̄̋̂ͪ͋̈̎̑̽̑͋͊̀͒̃ͮͤ̆ͤ̀̏͛́ͯ̽̎͛̅̈́ͭ̏̚̚͘͜͢͝͠͠͡͞͝4