# touch-event

> Touch events for value-event

Latest version **1.0.0** (published 2016-04-21) · MIT license · 0 weekly downloads

## Install

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

## 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-04-21 |
| First published | 2016-04-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | touch, events, dom, delegator, value-event, virtual-dom |

## Links

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

## Dependencies (6)

- [xtend](https://npm.io/package/xtend.md) ~4.0.1
- [map-keys](https://npm.io/package/map-keys.md) ~1.0.0
- [nest-object](https://npm.io/package/nest-object.md) ~1.0.5
- [value-event](https://npm.io/package/value-event.md) ~5.1.0
- [dom-delegator](https://npm.io/package/dom-delegator.md) ^13.0.0
- [split-camelcase](https://npm.io/package/split-camelcase.md) ~1.0.1

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-04-21

## README

# touch-event [![Build Status](https://travis-ci.org/bendrucker/touch-event.svg?branch=master)](https://travis-ci.org/bendrucker/touch-event)

> Touch events for value-event


## Install

```
$ npm install --save touch-event
```


## Usage

```js
var touchEvent = require('touch-event')
var h = require('virtual-dom/h')

h('div', {
  'ev-touchmove': touchEvent.move(moveHandler)
})
```

## API

#### `touchEvent.start(handler, [data])` -> `function`
#### `touchEvent.end(handler, [data])` -> `function`
#### `touchEvent.move(handler, [data])` -> `function`
#### `touchEvent.cancel(handler, [data])` -> `function`

##### handler

*Required*  
Type: `function`

The handler to call when the element receives the specified touch event.

##### data

Type: `object`  
Default: `{}`

Data to pass to the handler when the element is scrolled. This will be extended with an array of `touches` objects. Touch data will be nested:

```js
[
  {
    client: {x, y}
    //...
  }
]
```


## License

MIT © [Ben Drucker](http://bendrucker.me)

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