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

@weftcore/aegis

v1.1.3

Published

Universal client-side runtime security guard and anti-reverse-engineering suite. Protects against DevTools inspection, headless scraping, AI decompilers, source extraction, and unauthorized iframe embedding.

Readme

@weftcore/aegis

🛡️ Universal client-side runtime security guard, anti-reverse-engineering, and anti-tamper suite.

Zero hardcoded domains. Zero dependencies. Works with any web app, framework, and cloud deployment.


What It Protects Against

| Threat | Module | How It Works | |---|---|---| | DevTools Inspection | Multi-Vector Anti-Debug | Docked dimension differential checks (outerWidth - innerWidth > 160), Web Worker heartbeat monitor, and active timing traps. | | Iframe Prototype Leaks | Iframe Prototype Shield | Intercepts document.createElement('iframe') and poisons clean prototype extraction to prevent bypasses. | | Token Theft & Memory Dumps | Non-Extractable Key Enclave | Uses true non-extractable WebCrypto keys (extractable: false) stored in IndexedDB with 96-bit random IVs and AES-GCM (256-bit). | | API Replay & Mass Scraping | Signer & Micro Proof-of-Work | Signs requests with HMAC-SHA256 and client-side micro-PoW hashcash puzzles that throttle automated bots. | | Stealth Bots & Headless Scrapers | Hardware & DSP Fingerprint | AudioContext floating-point DSP variance, Canvas 2D winding geometry, WebGL software rasterizer & shader precision analysis. | | AI Reconnaissance & Scanners | Multi-Scope Honeypots | Global window & hidden DOM decoy traps returning synthetic poisoning payloads to waste scanner tokens and alert telemetry. | | Unauthorized Framing | Frame Guard | Strict ancestor and document.referrer validation with automatic DOM wiping and redirect. | | Runtime Monkey-Patching | Deep Freeze | Recursively freezes objects and prototypes to prevent method overrides. | | Console Data Harvesting | Console Silencer & Plugin | Multi-line balanced parenthesis stripper and production console silencer. |


Installation

npm install @weftcore/aegis

Quick Start (Runtime Shield)

Initialize the guard at the top of your app entry point (main.ts / index.tsx / App.tsx):

import { initSecurityGuard } from '@weftcore/aegis';

initSecurityGuard({
  allowedOrigins: /^https:\/\/([a-zA-Z0-9-]+\.)?example\.com$/,
  unauthorizedRedirectUrl: 'https://example.com',
  onViolation: (type, detail) => {
    console.error('Security alert:', type, detail);
  },
});

Advanced Upgrades & Features

1. Encrypted Storage Enclave (secureStorage)

Protect sensitive JWT tokens from being read in plain text via DevTools:

import { secureStorage, secureSession } from '@weftcore/aegis';

// Stored as AES-GCM encrypted ciphertext in localStorage
await secureStorage.setItem('TOKEN', 'jwt-token-value');

// Decrypted seamlessly
const token = await secureStorage.getItem('TOKEN');

2. Dynamic Request Signing (Anti-Tamper & Anti-Replay)

Sign outgoing API requests so they cannot be copied into curl, Postman, or replayed by attackers:

import { createSignedFetcher } from '@weftcore/aegis';

const secureFetch = createSignedFetcher(fetch, {
  secretKey: 'your-shared-client-salt',
  headerPrefix: 'X-Aegis',
});

// Outgoing request automatically has X-Aegis-Timestamp, Nonce, and Signature
const response = await secureFetch('/api/protected-endpoint', {
  method: 'POST',
  body: JSON.stringify({ action: 'checkout' }),
});

Server-Side Verifier (Cloudflare Pages Functions / Workers / Node.js)

import { verifySignature } from '@weftcore/aegis';

const isValid = await verifySignature(
  request.method,
  request.url,
  bodyText,
  request.headers,
  { secretKey: 'your-shared-client-salt' }
);

if (!isValid) {
  return new Response('Unauthorized Request', { status: 401 });
}

3. Stealth Bot & Headless Detection

import { detectStealthBot } from '@weftcore/aegis';

const { isBot, score, reasons } = detectStealthBot();
if (isBot) {
  // Take defensive action (e.g., render captcha or block)
}

4. Bundler Plugin (@weftcore/aegis/plugin)

Integrate into vite.config.ts or rspack.config.mjs:

import { aegisPlugin } from '@weftcore/aegis/plugin';

export default {
  plugins: [
    aegisPlugin({
      dropConsole: true,
      injectPreamble: false,
    }),
  ],
};

API Reference

initSecurityGuard(options?)

| Option | Type | Default | Description | |---|---|---|---| | allowedOrigins | RegExp \| string[] | — | Permitted iframe parent origins | | unauthorizedRedirectUrl | string | — | Redirect URL when framed by unauthorized parent | | allowLocalhostInDev | boolean | true | Allows localhost and 127.0.0.1 in development mode | | silenceConsole | boolean | true | Silences console outputs in production | | antiDebug | boolean | true | Triggers active debugger trap loop | | antiDebugIntervalMs | number | 2000 | Debugger check loop frequency | | antiSourceExtraction | boolean | true | Blocks REA and AI code extraction tools | | antiHeadless | boolean | true | Detects automation bots and software GPUs | | antiAiScanners | boolean | true | Deploys honeypot traps for AI recon scanners | | blockDevShortcuts | boolean | true | Intercepts F12, Ctrl+Shift+I/J/C, and right-click | | freezeTargets | object[] | — | Objects to deep-freeze | | onViolation | (type, detail?) => void | — | Callback invoked on security breaches |


License

MIT © weftcore