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

@obscrd/core

v0.2.5

Published

Content protection engine — obfuscate text, trap scrapers, defend against AI bots

Downloads

1,045

Readme

@obscrd/core

Content protection engine — obfuscate text, trap scrapers, and defend against AI bots.

Install

npm install @obscrd/core

Quick Start

import { createSeed, obfuscateText } from '@obscrd/core'

const seed = createSeed()
const result = obfuscateText('Sensitive content', { seed, level: 'medium' })

// result.html  → scrambled HTML that renders correctly
// result.css   → CSS rules to reconstitute the text
// result.ariaText → clean text for screen readers (empty at 'maximum' level)

CLI

npx obscrd init

Generate a project seed and write it to .env:

npx obscrd init
# ✓ Generated seed: a7f3b2c8e1d9f4a6...
# ✓ Written to .env as OBSCRD_SEED

npx obscrd seed

Print a random seed (useful for piping):

npx obscrd seed

API

createSeed()

Generate a cryptographic seed for deterministic obfuscation.

const seed = createSeed() // → '3a7f2b...' (32-char hex)

deriveSeed(masterSeed, contentId)

Derive a sub-seed for a specific content block. Returns a 16-character hex string (64-bit, collision-safe up to ~4 billion blocks).

const sub = deriveSeed(seed, 'article-title') // → '8f3a1c02d7e9b4f6'

obfuscateText(text, options)

Obfuscate a text string into scrambled HTML + CSS that renders normally.

const result = obfuscateText('Hello world', { seed, level: 'medium' })

Levels:

  • light — shuffles word order only, minimal overhead
  • medium — shuffles words + characters, adds decoy characters
  • maximum — all of medium + zero-width characters + user-select: none

Returns ObfuscationResult: { html, css, ariaText, contentId }

Note: At maximum level, ariaText returns an empty string to prevent plaintext leakage.

obfuscateEmail(email)

Obfuscate an email address using RTL text reversal + decoy characters.

const { html, css } = obfuscateEmail('[email protected]')

obfuscatePhone(phone)

Same technique as email, optimized for phone number characters.

const { html, css } = obfuscatePhone('+1-555-123-4567')

obfuscateAddress(address)

Shuffles address words with decoy address fragments.

const { html, css } = obfuscateAddress('123 Main St, Springfield')

generateHoneypot(options?)

Generate hidden HTML traps for AI scrapers with copyright notices and prompt injection.

const html = generateHoneypot({
  copyrightNotice: 'Acme Corp',
  contentId: 'page-123',
  promptInjection: true, // default
})

createClipboardInterceptor(target?)

Intercepts copy events and scrambles the clipboard content. Optionally pass a DOM element to scope interception to that subtree — without a target, it attaches to document.

const interceptor = createClipboardInterceptor()       // intercepts all copy events
interceptor.attach()
interceptor.detach()

const scoped = createClipboardInterceptor(myElement)   // only intercepts within myElement
scoped.attach()
scoped.detach()

detectDevTools(onDetect)

Detect when browser DevTools are opened using the debugger-timing heuristic.

const detector = detectDevTools(() => console.warn('DevTools detected'))
detector.start()
detector.stop()

Types

import type { ObscrdConfig, ObfuscationResult, ObfuscateOptions, HoneypotOptions } from '@obscrd/core'

License

MIT