npm.io
0.0.1 • Published 5 years ago

@emotionagency/touchmouse

Licence
MIT
Version
0.0.1
Deps
0
Size
11 kB
Vulns
0
Weekly
0

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)

Keywords