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

@quazardous/quarkernel

v2.3.2

Published

Micro Custom Events Kernel with dependency ordering, shared context, and composite events

Downloads

145

Readme

QuarKernel

npm version bundle size license

Event orchestration with dependency ordering, shared context, and state machines.

TypeScript-first. Zero dependencies. < 2KB gzipped.

Try QK Studio Try FSM Studio


Why QuarKernel?

// Other event libs: fire and pray
emitter.emit('user:login', data);

// QuarKernel: orchestrate with confidence
qk.on('user:login', fetchUser, { id: 'fetch' });
qk.on('user:login', logAnalytics, { after: ['fetch'] }); // Guaranteed order
qk.on('user:login', (e) => greet(e.context.user));       // Shared context

What makes it different:

| Feature | mitt | emittery | QuarKernel | |---------|:----:|:--------:|:--------------:| | Dependency ordering | - | - | Yes | | Shared context | - | - | Yes | | Composite events | - | - | Yes | | Wildcards | - | - | Yes | | Async/await | - | Yes | Yes | | TypeScript | Yes | Yes | Yes | | < 2KB | Yes | Yes | Yes |


Install

npm install @quazardous/quarkernel
<!-- CDN -->
<script src="https://unpkg.com/@quazardous/quarkernel@2/dist/index.umd.js"></script>

Quick Start

import { createKernel } from '@quazardous/quarkernel';

const qk = createKernel();

// 1. Dependency ordering - control execution sequence
qk.on('checkout', async (e) => {
  e.context.inventory = await checkStock(e.data.items);
}, { id: 'stock' });

qk.on('checkout', async (e) => {
  // Runs AFTER stock check - guaranteed
  await processPayment(e.data.card, e.context.inventory);
}, { after: ['stock'] });

await qk.emit('checkout', { items: ['sku-123'], card: 'tok_visa' });
// 2. Composite events - react to event combinations
import { Composition } from '@quazardous/quarkernel';

const checkout = new Composition([
  [qk, 'cart:ready'],
  [qk, 'payment:confirmed']
]);

checkout.onComposed(() => {
  console.log('Both events fired - proceed to shipping!');
});
// 3. Wildcards - catch event patterns
qk.on('user:*', (e) => console.log('User action:', e.name));
// Matches: user:login, user:logout, user:signup...

State Machines (FSM)

Built-in finite state machine support with XState-compatible format:

import { createMachine } from '@quazardous/quarkernel/fsm';

const order = createMachine({
  id: 'order',
  initial: 'draft',
  context: { items: 0 },
  states: {
    draft: { on: { SUBMIT: 'pending' } },
    pending: { on: { APPROVE: 'confirmed', REJECT: 'draft' } },
    confirmed: { on: { SHIP: 'shipped' } },
    shipped: {}
  },
  onEnter: {
    confirmed: (ctx, { log }) => log('Order confirmed!')
  },
  on: {
    SUBMIT: (ctx, { set }) => set({ submittedAt: Date.now() })
  }
});

order.send('SUBMIT');
console.log(order.state); // 'pending'

Features:

  • XState import/export (fromXState, toXState)
  • Behavior helpers: set(), send(), log()
  • Auto-timers for delayed transitions
  • Visual debugging with FSM Studio

Framework Adapters

Official bindings with auto-cleanup on unmount:

| Package | Framework | Docs | |---------|-----------|------| | @quazardous/quarkernel-vue | Vue 3 | README | | @quazardous/quarkernel-react | React 18+ | README | | @quazardous/quarkernel-svelte | Svelte 5 | README |

# Vue
npm install @quazardous/quarkernel @quazardous/quarkernel-vue

# React
npm install @quazardous/quarkernel @quazardous/quarkernel-react

# Svelte
npm install @quazardous/quarkernel @quazardous/quarkernel-svelte

Documentation

Guides:

Packages:

Resources:


Use Cases

Request pipeline - Auth, validate, transform, respond in guaranteed order

Game events - Combo detection with composite events

Form wizards - Step dependencies with shared validation context

Order workflows - State machines for order lifecycle (draft → pending → confirmed → shipped)

Analytics - Wildcard listeners for all track:* events

Microservices - Event choreography with dependency graphs

UI flows - FSM-driven modals, wizards, and multi-step forms


License

MIT - Made by quazardous