# easy-touch

> a light weight javascript gestures library

Latest version **1.0.0** (published 2016-06-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install easy-touch
pnpm add easy-touch
yarn add easy-touch
bun add easy-touch
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-06-14 |
| First published | 2016-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | limi58 |
| Maintainers | limi58 |
| Keywords | touch, gesture |

## Links

- npm: https://www.npmjs.com/package/easy-touch
- Repository: https://github.com/limi58/easy-touch
- Homepage: https://github.com/limi58/easy-touch#readme
- Issues: https://github.com/limi58/easy-touch/issues
- npm.io page: https://npm.io/package/easy-touch

## Recent versions

- 1.0.0 (latest) — 2016-06-14

## README

# easy-touch
a light weight javascript gestures library

# Usage
1.

```
npm install --save easy-touch
```
or 
```html 
<script type="text/javascript" src='./dist/easy-touch.min.js'></script>
```

2.

```js 
const touch = new Touch(window)
touch.on('pan', e => {
  if(e.type === 'panleft') console.log('finger is move to left')
})
```

# API
## on
**on(str action, fn callback) 监听 action 动作**

`action` 目前支持：

 `pan` （滑动） 

`callback` 需要一个参数 e，e 参数会有个 `type` 属性：

`pan` ：`panleft`, `panright`, `panup`, `pandown`

---
_Source: https://npm.io/package/easy-touch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
