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

fingertips

v0.0.4

Published

A highly configurable touch event library

Downloads

15

Readme

fingertips

(still in early development)

For what I've been working on I needed an abstraction for reasoning about and dealing with touch events.

If you want to do something on touchhold for example. There is no such thing natively. There's just touchstart, touchmove, touchend (and a couple others for determining how the touch ended).

In order to let your app respond to a hold event you're really wanting to listen for an event that doesn't exist.

I started with Hammer.js, a very nice, and far more mature touch library than this.

But, ultimately it didn't fit my needs because I wanted something that would let me very selectively preventDefault on events to either allow or disallow normal browser scrolling based on rules and conditions or even the direction of the first touchmove event. There may be a way to do that with Hammer.js but I didn't find one.

I also wanted to be able to handle multiple individual touches individually if I so chose.

So I started modeling touches with... Model code. Specifically statey as it turns out intelligently evented derived properties are very useful for efficiently modeling user behavior.

Unfortunately, in order to give this level of control I've ended up with an API that's a bit trickier to wrap your mind around.

You create a single touch listener that gets called with each touch event (real or similated, like hold) and gives your callback two arguments:

  • event {Event | undefined} The native undecorated browser touch event if it exists.
  • touch {TouchModel} The model that represents the touch currently in progress.

This TouchModel contains all the information it has about that whole touch up to that point. So, if you initiate a touch, move it a bit, then lift it. At each point along the way that same event handlers is being called, with increasingly more information added to the touch model it gets called with.

var TouchListener = require('fingertips');


var listener = new TouchListener(this.el, function (event, touch) {
    // do stuff here

    // for example prevent sideways native scrolling, but allow native up and down scrolling
    if (touch.firstAxis === 'x' && !model.sorting) {
        // on hold `e` won't exist
        if (e) e.preventDefault();

        return;
    }

    // something else
    if (touch.x > 75) {
        // do something
        return;
    }

    // some other condition
    if (touch.done) {
        // touch event is over
        myapp.kaboom();
        return;
    }
});

For a full reference of what you can learn from the touch model. See the props, session and derived properties in the touch-model.js file.

Installing

Currently only structured for use with Browserify/CommonJS. Install from npm.

npm i fingertips

Changelog

  • 0.0.1 diff Switching to statey instead of human-model
  • 0.0.0 initial publish

Credits

Written by @HenrikJoreteg, still rough, use with caution.

License

MIT