1. prosthetic-hand
Automate synthetic touch/pointer events
prosthetic-hand
Package: prosthetic-hand
Created by: IvanSanchez
Last modified: Fri, 03 Nov 2023 13:08:03 GMT
Version: 2.0.0
License: Beerware
Downloads: 6,990
Repository: https://github.com/IvanSanchez/prosthetic-hand

Install

npm install prosthetic-hand
yarn add prosthetic-hand

🖐️ prosthetic-hand 🖐️

A JavaScript library to emulate mouse/touch/pointer events, designed to help unit-test touch gestures.

Installation

 npm install prosthetic-hand

Usage

 import Hand from 'prosthetic-hand';

const hand = new Hand();
const finger = h.growFinger('pointer', { pointerType: 'touch', pressure: 0.9 });

finger
  .wait(500)
  .moveTo(200, 250, 0)
  .down()
  .moveBy(100, 150, 2000)
  .up();

For more information see the API documentation and demos.

Testing

Run npm install and npm start, then open the URL printed in the console in your preferred browser.

Building the documentation

Run npm run build-docs and open the api-docs.html file generated by it.

Contributing code

Read the Leaflet guidelines. Whenever making a bugfix or a new feature, notify IvanSanchez so that a new version can be published to NPM.

Legalese

"THE BEER-WARE LICENSE":

[email protected] wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code