tp-pointer-events
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

tp-pointer-events

Build Status Coverage Status npm version monthly downloads code style: prettier semantic-release UNPKG liense

Intro

Extend the mobile-side event touchstart / touchmove / touchend logic to the desktop.

Example

import PointerEvents from 'tp-pointer-events';
 
function pointerDown(e){
  // do something
}
 
function pointerMove(e){
  // do something
}
 
function pointerUp(e){
  // do something
}
 
const pointerEvents = new PointerEvents(this._el, pointerDown, pointerMove, pointerUp, {});

Install

NPM Badge

API

Development

  • npm t: Run test suite
  • npm start: Run npm run build in watch mode
  • npm run test:watch: Run test suite in interactive watch mode
  • npm run test:prod: Run linting and generate coverage
  • npm run build: Generate bundles and typings, create docs
  • npm run lint: Lints code
  • npm run commit: Commit using conventional commit style (husky will tell you to use it if you haven't 😉)

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i tp-pointer-events

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

1.67 MB

Total Files

65

Last publish

Collaborators

  • hsiang