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

time-counter

v1.0.0

Published

Simple time counter tracker

Readme

time-counter

Dead simple count down or count up timer for node and in browser using clientmodules or browserify.

For a standalone version that bundles required modules just use time-counter.bundled.js.

This isn't meant to be scientifically amazingly perfect. Because we're just looping and comparing with a start time at a set interval. This approach is a bit flawed because it's impacted by the event loop, etc. But it's good enough for the vast majority of regular web app uses.

Install

npm install time-counter

How it works

// creating a count up timer
var Timer = require('time-counter'),
    log = console.log.bind(console);

var countUpTimer = new Timer();

// log out time, could also be used to 
// write to DOM of course.
countUpTimer.on('change', log);

// start it
countUpTimer.start();


// creating a countdown timer
var countDown = new Timer({
    direction: 'down', 
    startValue: '1:00' // one minute 
});

// log it out every time it's updated
countDown.on('change', log);

countDown.on('end', function () {
    console.log('Blastoff!'); 
});

Available options

Default values shown:

{
    direction: 'up',  // can also be 'down'
    startValue: 0, // starting point, useful for 'down' but works for up too
    targetValue: '', // i.e. "1:00:00" is one hour, shoudl be in format: hours:minutes:seconds
    interval: 50, // how fast to run the loop and determine if the time has changed 
    showHours: false // whether or not to show hours if they're empty
}

Building

To build bundled version run node build at project root.

License

MIT