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

@themoonlitcompany/mbevents

v0.1.0

Published

Client SDK for Momentum Events: a white-label RSVP engine. Read events, render your own form, submit RSVPs.

Readme

@themoonlitcompany/mbevents

Client SDK for Momentum Events, a white-label RSVP engine. The backend workflow is prebuilt; this package gives your front end ready-made tools to talk to it. Zero dependencies, works in the browser and Node.

Install

npm install @themoonlitcompany/mbevents

Quick start

Every Momentum event has a slug and a public event key (find both on the event's API tab in the console). The key only grants reading the published event and submitting RSVPs, so it is safe in browser code.

import { createEventClient } from "@themoonlitcompany/mbevents";

const client = createEventClient({
  baseUrl: "https://your-momentum-deployment.com",
  slug: "spring-launch-dinner",
  eventKey: "me_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
});

// 1. Read the event and its question definitions
const event = await client.getEvent();

// 2. Submit an RSVP (idempotency key is generated for you)
const result = await client.accept({
  email: "[email protected]",
  fullName: "Guest Name",
  partySize: 2,
  answers: { meal_preference: "Vegetarian" },
});

console.log(result); // { rsvpId: "...", status: "accepted", deduped: false }

Tools included

| Tool | What it does | | --- | --- | | client.getEvent() | Fetches the published event with questions | | client.submitRsvp(input) | Submits or updates an RSVP (any status) | | client.accept(input) / client.decline(input) | Status shorthands | | toFormFields(event) | Flattens built-in fields + questions into an ordered, renderable field list | | validateAnswers(event, answers) | Client-side validation mirroring the server, for instant feedback | | isRsvpClosed(event) | Whether the RSVP deadline has passed | | MomentumError | Thrown on API errors; carries .status and a human-readable message |

Rendering a form from the event definition

import { createEventClient, toFormFields, validateAnswers } from "@themoonlitcompany/mbevents";

const client = createEventClient({ baseUrl, slug, eventKey });
const event = await client.getEvent();

// Drive your markup from the definition; it stays in sync with the console.
for (const field of toFormFields(event)) {
  renderInput(field); // your UI, your brand
}

// Validate before submitting
const errors = validateAnswers(event, collectedAnswers);
if (Object.keys(errors).length === 0) {
  await client.accept({ email, fullName, answers: collectedAnswers });
}

Error handling

import { MomentumError } from "@themoonlitcompany/mbevents";

try {
  await client.accept({ email, fullName });
} catch (error) {
  if (error instanceof MomentumError) {
    // Server messages are written to be shown to guests,
    // e.g. "This event is at capacity." or "Meal preference is required."
    showMessage(error.message);
  }
}

What the engine enforces server-side

Required questions, capacity, party-size limits, RSVP deadlines, one response per email (repeat submissions update the existing RSVP), and idempotent retries. Your front end never reimplements the workflow.