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

timeweave

v1.0.0

Published

Generate a visual timeline that tells your story from as many angles as you want. A batteries-included library that will let you get started quickly.

Readme

Timeline Library

This is a timeline that can display chronogically-connected events, across all sorts of scales (ex. the effects of the 2008 crisis on each continent of the world, the timeline of your favorite Formula 1 season, or even the timeline of two rival sports teams).

Features

  • A simple API: setting the timeline up requires a few lines, and every needed element has a default component that is already provided.

  • Premade components: this Timeline plugin features a default SVG renderer and three calendars (your everyday calendar, an Islamic and Jewish calendar) to get you started.

  • Highly customizable calendars: create your own calendar, provide your own days, numbers of weeks, months, odd days, conditions for odd days (such as February 29th), or any time unit you desire!

  • Multiple concurrent timelines: where a regular library can only track a single timeline, this library allows you to track many ones at the same time! See how events, even the ones that are not related, unfolded across multiple areas at the same time.

  • Get a precise idea of eras, epochs and time periods in which your events happen, with realistic measures of time between events.

  • Highly customizable output: the dimensions of the SVG, the size of the content, the viewbox, the calendar, the events, the number of trackable periods.

  • High portability: this library renders into an HTML document by default. You can create your own custom renderer to display the timeline in any display format you want.

Getting Started

Creating a Calendar

If you wish to create your custom Calendar, you'll need:

  • An instance of the Calendar class (let's call it c1)
  • Add divisions to c1 (divisions are representations of, for example, months, years, and days).
c1.addDivision("year", 12); // a year is made of 12 instances of the next division, months
c1.addDivision("month", [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ["January","February","March","April","May","June","July","August","September","October","November","December"]);
// each month is defined by how many days there are in it
c1.addDivision("day");
  • If you wish to have specific notions that are non-essential groups of a certain division (ex. a semester which is equal to 6 months), you'll have to add what's called a secondary division:
c1.addSecondaryDivision("week", 2, 7, ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]);
c1.addSecondaryDivision("trimester", 1, 3);
c1.addSecondaryDivision("semester", 1, 6);

First argument is the name of your secondary division, second argument is the index of the division (or subdivision) you want a group of, third argument is how many of the items inside the subdivision index make up that secondary division (ex. in the weeks example, we have 7 days, which are the third element in the year/month/day calendar system).

Configuring your Timeline to use our Calendar

  • Create a Timeline instance:
const inst = new Timeline();
  • Set it to the Calendar you just created:
inst.setCalendar(c1);
  • Set the starting and end points of the timeline (starting and ending points of the events). The renderer will use this information to properly display the timeline.
inst.setStartingPoint([year, month, day]);
inst.setEndingPoint([end_year, end_month, end_day]);

Now you can start creating events, temporal lines, periods, and get a "real" timeline.

  • An event is a one-off occurrence (ex. a meeting, a sporting event).
  • A Period extends to a certain period of time, and contains many events.
  • A Temporal Line is a separate container for Periods and Events. They tell the Timeline's story from another perspective.

API

Timeline

Timeline.addTemporalLine(name: string) Add a Temporal Line. Returns the temporal line.

Timeline.setStartingPoint(date: number | number[]) Set the Timeline's starting point. Use a number if you want a much more precise value than a date array.

Timeline.setEndingPoint(date: number | number[]) Set the Timeline's ending point. Use a number if you want a much more precise value than a date array.

Temporal Line

TemporalLine.addEvent(options: EventAddingOptions) Add an event. Options are detailed below.

TemporalLine.addPeriod(options: PeriodAddingOptions) Add a Period that can contain many events. Options are detailed below.