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

@filecage/zeitmeister

v0.1.0

Published

zeitmeister is an open source library for scheduling appointments over an unlimited number of calendars.

Readme

zeitmeister

zeitmeister is an open source library for scheduling appointments over an unlimited number of calendars.

I built it for myself because I wanted a custom, slim solution that doesn't force me to give third parties access to my calendars.

It uses

Calendar Connectors

zeitmeister supports CalDAV and WebDAV based calendars and implements access via tsdav.

You can add a calendar to the config like this:

type Calendar = {
    // A unique identifier for this calendar. Only required if you want to reference it as SchedulingCalendar.
    identifier?: string,
    
    // Type of the calendar. Be aware that `ical` cannot be used as SchedulingCalendar because it's read-only.
    adapter: 'caldav', // not supported yet: | 'googlecalendar' | 'ical',

    // URIs of the exact calendars that you want to check for. Can be relative to the server URI
    uris: string[],
    
    // Currently only username/password for HTTP basic auth supported
    auth: {
        username: string,
        password: string,
    }
}

Usage

Create instance

Create an instance of zeitmeister.Scheduler with your calendar- and availability configuration:

import {Scheduler} from 'zeitmeister';

const scheduler = new Scheduler({
    calendars,
    availability: [
        {
            // A string in the date-fns format of `EEEE HH:mm`
            start: 'monday 10:00',
            end: 'monday 17:30',
        },
        {
            // Days in the date-fns format of `EEEE`, start/end in the format of `HH:mm`
            days: ['thursday', 'friday'],
            start: '10:30',
            end: '18:00',
        }
    ],
    defaults: {
        duration: '30m',
        padding: '15m',
        planningAhead: '10d',
    },
    scheduleActors: [],
});

type ScheduleActor = (intent: {
    datetime: Date,
    duration: Interval,
    title: string,
    description: string,
    location: {type: 'virtual', url: string} | {type: 'physical', address: string},
    attendee: {
        emailAddress: string,
        name: string,
    }
}) => Promise<void>;

Query for available timeslots

const slots = scheduler.query({
    start: new Date('2026-02-09'),
    end: new Date('2026-02-21'), // Note: if you omit the "end" date, the scheduler will use `start` + your default planning ahead interval
});

type slot = {
    start: Date,
    end: Date,
    available: boolean, // whether this slot is available or not
}

This will

  1. Read your calendars and create busy times from all of your events within the query timeframe that don't have FBTYPE set to FREE
  2. Create a negative of busy times from your availability config for each week within the query timeframe
  3. Return available slots

Schedule a slot

[!WARNING] Scheduling is not yet implemented :)


enum ScheduleResult {
    SCHEDULED,
    FAILED_INVALID_INTENT,
    FAILED_SLOT_UNAVAILABLE,
}

const event = scheduler.schedule(scheduleIntent);

This will

  1. Verify that the intent follows all given rules (duration, padding and within the previously defined availability slots - otherwise returns ScheduleResult.FAILED_INVALID_INTENT)
  2. Get up-to-date calendar data (bypassing caches) to verify that the intended slot really is available (otherwise returns ScheduleResult.FAILED_SLOT_UNAVAILABLE)
  3. Calls all defined schedule actors with the given intent. All actors will be called asynchronously. If any actor fails, an SchedulingError will be thrown with all errors that occurred during scheduling. However, actors will not be aborted.