shartjs
v1.1.2
Published
When your app crashes, it farts. That's it.
Maintainers
Readme
🐛 Debugging doesn't have to stink. But it can.
shartjs is a tiny Node.js package that plays a random fart sound when your app crashes — consider it a strong motivator to write better error handling.
🚀 Install
pnpm add -D shartjs
# or
npm install --save-dev shartjs
# or
yarn add -D shartjs🛠 Usage
In your app entry point (index.ts, server.ts, etc.):
import { initShart } from "shartjs";
initShart();Now, if your app throws an unhandled exception or rejection, shart will: • 💨 Play a random fart sound • 💥 Log the error • ☠️ Exit the process
🌱 Dev-Only Mode
Want to keep things professional in production?
if (process.env.NODE_ENV === "development") { initShart(); }
🧪 Example
import { initShart } from "shart";
initShart();
throw new Error("Oh no I sharted"); // 💩💨📦 What’s Included
- ✅ 3 glorious .wav fart files
- ✅ Zero runtime dependencies (except play-sound)
- ✅ Works with Node.js v16+
- ✅ ESM-only support (modern import style)
📝 License
MIT © Parth Koshti
