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

wbh

v257.1.9

Published

πŸ”¨ Restrict access to your website from web browsers without specific features.

Readme

πŸ”¨ Web Browser Hard (WBH)

The API of this module is rapidly changing and is not intended for production or commercial use.

To suit your specific needs, it’s necessary to fork this project (with attribution). You can expect the next major version (v260) to be more stable. 🌟

🎁 Features

  • 🧬 Modular: You can use it on any framework (Svelte, Vue, etc.)
  • πŸ“Š Versatile: Pick from 50+ browser features to get checked
  • πŸŽ›οΈ Customizable: Set metadata, header and footer as you like
  • 🌲 Tree-shakeable: Unused imports stay out of bundle
  • πŸš€ Easy to use: Comes with TypeScript and mountError function

Any question? You can first read Q&A on the wiki.

πŸ“· Screenshot

| Dark | Light | | :---------------------------------------------------------------: | :-----------------------------------------------------------------: | | Example screenshot (dark mode, AVIF) | Example screenshot (light mode, AVIF) |

If you can’t see the screenshot above, that means your browser does not support AVIF image format!

🧭 Example Code

/* Import the main class, level (0–3) and feature items */
import {
	WBH,
	WBHLevel as L,
	avif,
	fileSystemApi,
	cssAspectRatio,
	/*...*/
} from '@mdrv/wbh'

/* Initialize the main class */
const wbh = new WBH(
	[
		{
			feat: avif,
			level: L.CRITICAL, // 0
			score: 50,
			wisdom:
				'Most images hosted on this website are highly-optimized AVIF files.',
		},
		{
			feat: fileSystemApi,
			level: L.IMPORTANT, // 1
			score: 50,
			wisdom: 'Needed to store binary data locally in an organized manner.',
		},
		{
			feat: cssAspectRatio,
			level: L.OPTIONAL, // 2
			score: 49,
			wisdom:
				'Some layouts/containers depend on aspect ratio of their surroundings.',
		},
		/*...*/
	],
	/* Enable forceFail to enforce the lowest score */
	{ forceFail: false },
)

/* Fetch the result and act based on score */
const target = document.getElementById('__app__')
/* Synchronous version (WBH.lastResult) will bypass async feature check */
wbh.lastResultAsync.then((result) => {
	if (result.score >= 0) {
		/* Render your actual app here! */
		/* mount(App, target) */
	} else {
		import('@mdrv/wbh/mount').then(({ mountError }) =>
			mountError(result, target, {
				/* You can customize header with DOM element/Markdown */
				headerEl: '# Oops! :(',
				/* You can customize footer with Markdown */
				footerMd: '[Powered by **@mdrv/wbh**](https://github.com/mdrv/wbh)',
			}),
		)
	}
})

πŸ”” Release Info

This package implements Gregorian YYM-based semver notation.

  • πŸ“… v257.x.x: Released around/on July 2025. (current)
  • πŸš€ v260.x.x: Released from October to December 2025.

For every major release, the preceding version will need to be imported with subpath:

/* Example: v260.x.x */
import { WBH as WBHv260 } from '@mdrv/wbh' // v260 (current)
import { WBH } from '@mdrv/wbh/v257' // v257 (previous)

See CHANGELOG for breaking changes, updates and fixes.

πŸ’– Thank You

This project is proudly using these libraries:

  • 🎨 RE:DOM (the most versatile yet lightweight DOM library)
  • πŸ“‘ Snarkdown (a very minimalist Markdown-to-HTML library)
  • 🧩 es-toolkit (modern JS utilities with TypeScript support)
  • πŸ₯Ÿ Bun.js (blazing fast server-side JS runtime)
  • πŸ“š Additional data: MDN and Can I use...