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

web-protect

v1.0.2

Published

Disable debugger manipulation in runtime. Good for multiplayer gameplays solution or some kind of security important pag

Readme

🛡️ web-protect

👤 Author: Nikola Lukić — 2025

📧 [email protected]

💼 Currently looking for a job

🔍 What is web-protect?

web-protect is a lightweight security helper designed to make runtime debugging and tampering more difficult on web pages.

It provides:

🔒 Debugger detection

🚫 Optional console disabling

👁️ Tab visibility tracking

⚠️ Runtime tamper-protection

🕹️ Useful for multiplayer game UIs, sensitive dashboards, or anti-cheat logic

⚠️ Disclaimer

This package is intended solely for protective purposes.

Use it at your own responsibility.

Do not use it to harm, disrupt, or interfere with legitimate users.

Ensure compliance with local laws and platform policies.

📦 Installation

npm install web-protect

or

yarn add web-protect

🔧 API protect(disableDebugger, disableConsole, onVisibilityChange) Parameter Type Description disableDebugger boolean Enables debugger freeze/detection. disableConsole boolean Disables console functions to make debugging harder. onVisibilityChange function Custom callback when the tab is hidden or shown. 🧪 Usage Example

import { protect } from "web-protect";

let hiddenAt = null;

protect(true, true, () => {
  if (document.visibilityState === "visible") {
    if (hiddenAt !== null) {
      const now = Date.now();
      const hiddenDuration = (now - hiddenAt) / 1000;

      if (hiddenDuration > 1) {
        console.log(`🟢⚠️ Tab was hidden for ${hiddenDuration.toFixed(2)} sec.`);
        document.title = document.title.replace("🟢", "🟡");
      }

      hiddenAt = null;
    } else {
      console.log("🟢 Tab is visible — first activation.");
    }
  } else {
    hiddenAt = Date.now();
  }
});

🔒 Console Protection

When disableConsole = true, these console functions are silenced:

log, info, warn, debug, trace

This makes runtime debugging significantly harder for attackers.

Debugger freeze/detection logic is also included internally.

❤️ Support

If you find this tool useful, consider starring the repository or sharing feedback.

💌 Contact: [email protected]

🧑‍💻 GitHub: https://github.com/zlatnaspirala