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

@uiwwsw/easter-egg

v0.2.0

Published

[![npm version](https://img.shields.io/npm/v/@uiwwsw/easter-egg.svg)](https://www.npmjs.com/package/@uiwwsw/easter-egg) [![Publish](https://github.com/uiwwsw/easter-egg/actions/workflows/publish.yml/badge.svg)](https://github.com/uiwwsw/easter-egg/actions

Readme

Easter Egg Library

npm version Publish License Stars

A simple JavaScript/TypeScript library to add an easter egg (Konami Code) to your web applications.

Features

  • Detects custom keyboard and pointer event sequences (default: Konami Code).
  • Executes a callback function upon successful sequence entry.
  • Basic debugger detection and code obfuscation for fun.

Installation

To use this library in your project, you can install it via Bun:

bun add @uiwwsw/easter-egg
# Or if you're using npm/yarn
# npm install @uiwwsw/easter-egg
# yarn add @uiwwsw/easter-egg

Usage

In your JavaScript/TypeScript project

import { createEasterEgg } from '@uiwwsw/easter-egg';

createEasterEgg(
  document.body, // The element to listen for keyboard/pointer events
  () => {
    alert('Easter Egg Triggered!');
    // Your custom easter egg logic here
  },
  [
    'keyboard:ArrowUp',
    'keyboard:ArrowUp',
    'keyboard:ArrowDown',
    'keyboard:ArrowDown',
    'keyboard:ArrowLeft',
    'keyboard:ArrowRight',
    'keyboard:ArrowLeft',
    'keyboard:ArrowRight',
    'keyboard:b',
    'keyboard:a',
  ] // Konami Code
);

Each entry in the array follows the format <type>:<value>:

  • keyboard:<event.key> listens for keyboard events fired on keydown.
  • pointer:<event.type> listens for pointer/mouse interactions such as click, pointerdown, or dblclick.

Need mouse interactions too? Mix and match both types:

createEasterEgg(document.body, () => {
  console.log('Keyboard and pointer combo unlocked!');
}, [
  'keyboard:Shift',
  'pointer:click',
  'pointer:click',
  'keyboard:Enter',
]);

In your HTML (for demo/direct use)

As demonstrated in index.html:

<script type="module">
  import { createEasterEgg } from './dist/index.js'; // Adjust path if necessary

  createEasterEgg(
    document.body,
    () => {
      alert('Easter Egg Triggered!');
    },
    [
      'keyboard:ArrowUp',
      'keyboard:ArrowUp',
      'keyboard:ArrowDown',
      'keyboard:ArrowDown',
      'keyboard:ArrowLeft',
      'keyboard:ArrowRight',
      'keyboard:ArrowLeft',
      'keyboard:ArrowRight',
      'keyboard:b',
      'keyboard:a'
    ]
  );
</script>

Development

Running the Demo

To run the demo page (index.html), you can use a simple static file server. If you have Bun installed, you can use bun --watch server.ts (as defined in package.json's dev script) or any other static server.

bun run dev

Then open http://localhost:3000 in your browser.

Building the Library

To build the distributable files (.js and .d.ts) for the library:

bun run build

This will output the compiled files into the dist/ directory.

License

This project is licensed under the MIT License. See the LICENSE file for details.