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

stagetime

v0.1.0

Published

Show or hide DOM elements during a given time.

Readme

stagetime

Latest Release - Documentation - Issues

stagetime helps you show or hide DOM elements based on the browser's local time. This allows you to schedule some content to automatically appear or disappear at a certain time.

version license build releases hits

Why?

Sometimes you want to show some information on the client, but it's only relevant for a certain period of time. Outside that window of time (e.g., buying tickets to a concert), that information is not relevant and should be hidden.

Note that stagetime doesn't remove any information from the source code; it merely adds classes to control which information is visible in the browser.

Getting Started

Download the latest release or include the following code on your page:

<style>.stagetime-off { display: none; }</style>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/stagetime.js"></script>

Examples

<div data-stagetime-after="2018-01-01" data-stagetime-until="2018-12-31">
    This message will appear during the year 2018.
</div>

<div data-stagetime-after="2018-01-01">
    This message will appear after 01 Jan 2018.
</div>

<div data-stagetime-until="2018-12-31">
    This message will appear until 31 Dec 2018.
</div>

Options

stagetime will search for elements with the following attributes:

  • data-stagetime-after - time to start displaying element
  • data-stagetime-until - time to stop displaying element

Note that you need to specify at least one of these attributes for stagetime to work properly.

stagetime will add the following classes:

  • stagetime-on - the item is supposed to be displayed
  • stagetime-off - the item is supposed to be hidden

You may style these however you wish. A recommended style is:

<style>.stagetime-off { display: none; }</style>

Goals & Non-Goals

  1. The goal of stagetime is to make it easy to show or hide DOM elements for a certain time window.
  2. It is a non-goal to allow multiple time windows.

License

Licensed under the MIT License.