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

@stacksjs/calendar

v0.0.1

Published

Dependency-free add-to-calendar links and RFC 5545 event generation

Readme

@stacksjs/calendar

Dependency-free add-to-calendar links and RFC 5545 event generation for Google Calendar, Outlook, Office 365, Yahoo Calendar, Apple Calendar, and any application that imports ICS files.

Install

bun add @stacksjs/calendar

Create every calendar link

import { createCalendarLinks } from '@stacksjs/calendar'

const links = createCalendarLinks({
  title: 'Stacks Launch',
  start: '2026-07-21T17:00:00-07:00',
  end: '2026-07-21T18:30:00-07:00',
  description: 'Launch notes, demos, and questions',
  location: 'Playa Vista, CA',
  timezone: 'America/Los_Angeles',
  url: 'https://stacksjs.org/launch',
})

links.google
links.outlook
links.office365
links.yahoo
links.ics
links.icsDataUrl

Provider-specific functions are also exported:

import {
  createIcs,
  createIcsDataUrl,
  googleCalendarUrl,
  office365CalendarUrl,
  outlookCalendarUrl,
  yahooCalendarUrl,
} from '@stacksjs/calendar'

All-day events

An omitted all-day end date means one day. Explicit all-day end dates are exclusive, matching Google Calendar and RFC 5545 semantics.

const conference = createCalendarLinks({
  title: 'Stacks Conference',
  start: '2026-09-14',
  end: '2026-09-17',
  allDay: true,
})

This event covers September 14, 15, and 16.

ICS files

createIcs returns standards-compatible calendar text with CRLF line endings, escaped text, deterministic event UIDs, exclusive all-day end dates, and UTF-8-aware 75-octet line folding.

const ics = createIcs(event, {
  productId: '-//Acme//Events//EN',
})

createIcsDataUrl returns an encoded URL suitable for a download link. It uses percent encoding instead of btoa, so Unicode titles and descriptions remain valid.

Date behavior

  • Timed events are emitted as UTC instants.
  • A timed event without end lasts 60 minutes by default.
  • Use durationMinutes to select another default duration.
  • Invalid dates, empty titles, non-positive durations, and end times before start throw descriptive errors.
  • timezone is forwarded to providers that support an explicit display timezone.

Development

bun install
bun test
bun run test:types
bun run lint
bun run build

License

MIT