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 🙏

© 2025 – Pkg Stats / Ryan Hefner

hacktuah

v0.0.2

Published

Gen Z-inspired try/catch block and logging utility for JavaScript and TypeScript developers.

Readme

Hacktuah 📢

Hacktuah: The ultimate Gen Z toolkit for error handling, logging, and throwing sassier errors than your ex's text messages! 🚀

Whether you're just casually vibing in the console or getting serious with error handling, hacktuah has you covered. It's got that Gen Z twist to keep things interesting while making sure your JavaScript and TypeScript code is the chef's kiss of readability and style.


💡 What’s Hacktuah?

Hacktuah is a JavaScript/TypeScript utility that adds some much-needed humor (and functionality!) to the typical try/catch blocks and console logs. We’re throwing more than errors here—we’re throwing attitude! Say goodbye to boring error handling and say hello to yappatron and hack for error-catching, plus yap for all your logging needs.


📦 Installation

Pop this into your project with a quick npm/yarn/pnpm install:

npm install hacktuah

Or, if you're feeling fancy:

bun add hacktuah

🔧 Usage

So, how do you add some Gen Z flavor to your code? It’s easy—let’s dive in!

1. Import It

First things first, bring hacktuah into your project:

import { yap, yappatron, hack } from "hacktuah";

2. Log Like a Legend with yap

Stop using basic console.log and start yap-ping.

yap("👋 Hello, world!"); // Logs a message with style
yap.warn("😬 Something might go wrong here..."); // Warning vibes
yap.error("💀 Oops! That's an error."); // Error vibes
yap.info("ℹ️ Just a heads-up!"); // Info vibes

3. Throw Spicier Errors with yappatron

Want to throw an error that makes your dev friends giggle? Meet yappatron:

yappatron("Bruh, you really messed this one up."); // Throws an error with sass

When you need to throw an error, make it unforgettable.

4. Handle Errors Like a Boss with hack and tuah

Say goodbye to boring try/catch blocks. With hack and tuah, you get style AND functionality:

hack(() => {
  // Try something risky here 👀
  throw new Error("Oopsies!");
}).tuah((error) => {
  yap.error("Caught it with style:", error.message); // Handle the error with elegance
});

Now, that’s error handling that slaps.


🔥 API Documentation

yap (Logging Utility)

A fun and flexible wrapper around console that logs with major vibes.

  • yap(...params): Logs a standard message.
  • yap.warn(...params): Logs a warning.
  • yap.error(...params): Logs an error.
  • yap.info(...params): Logs informational messages.

yappatron(message)

Throws an error with a custom message, Gen Z style. Great for when you just need to throw shade and stop execution.

  • Parameters:
    • message (string): The error message to sass up your error throwing.

hack(tryBlock)

Handles risky code blocks with style, letting you chain on a tuah method for error-catching.

  • Parameters:

    • tryBlock (Function): The function to execute in a try block.
  • Returns: An object with a tuah method for catching errors.

tuah(catchBlock)

The catch handler for hack. If an error is caught, tuah runs with the error as a parameter.

  • Parameters:
    • catchBlock (Function): The function that handles the caught error.

⚡ TypeScript Support

Hacktuah is 100% TypeScript-friendly! You'll get full type hints, auto-completion, and error-checking without any hassle.


🤘 Contributing

We’re all about the vibes here! If you want to make hacktuah even more extra, fork the repo, make some edits, and open a PR. All contributions welcome (especially if they’re hilarious).


💬 Support

Found a bug or just want to share the love? Drop an issue on GitHub. We’re here for it!


Hacktuah: Making your JavaScript sassy and unforgettable, one error at a time. 🌟

---