@emotionagency/touchmouse
v0.0.1
Published
Library that provides a common interface for mouse and touch events
Downloads
9
Maintainers
Readme
Library that provides a common interface for mouse and touch events
Instalation
npm i @emotionagency/touchmouse
or
yarn add @emotionagency/touchmouse
Usage
Basic example
import {mousedown, mousemove, mouseup} from '@emotionagency/touchmouse'
const cb = () => console.log('I am working')
mousedown.on(document.body, cb, {passive: true})
mousedown.off(document.body, cb)