Blog | Nathan Akrill

969b40fe-53df-45b3-b25e-e213c5a6a724-536-0000001563e160b2

Touch Handler โ€“ My first NPM package ๐Ÿ“ฆ

25th November 2019

I just published my first NPM package! Itโ€™s something Iโ€™ve wanted to do for a while, but Iโ€™ve never really had to build anything in Javascript that wasnโ€™t too specific to launch as a package. Until now.

Touch Handler ๐Ÿ‘ˆ

This package is a simple Javascript class that wraps around 4 Touch Events: touchstart, touchend, touchcancel, and touchmove.

The class allows for a developer to add 3 functions that will be called when a user touches, swipes, and releases on a particular element. Those functions provide access to the X and Y coordinates of that touch.

Download the package

The package is available on NPM, or GitHub. Contributions are also welcome ๐Ÿ˜Š.



< Back to home

Copyright 2021