# create-point-cb

> Create a point from a DOM event

Latest version **1.2.0** (published 2016-11-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install create-point-cb
pnpm add create-point-cb
yarn add create-point-cb
bun add create-point-cb
```

## 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.2.0 |
| Published | 2016-11-17 |
| First published | 2016-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Quentin Engles |
| Maintainers | hollowdoor |
| Keywords | DOM, point, event |

## Links

- npm: https://www.npmjs.com/package/create-point-cb
- npm.io page: https://npm.io/package/create-point-cb

## Dependencies (1)

- [type-func](https://npm.io/package/type-func.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.2.0 (latest) — 2016-11-17
- 1.1.0 — 2016-11-10
- 1.0.0 — 2016-06-03

## README

create-point-cb
===============

Install
-------

`npm install --save create-point-cb`

Usage
-----

```javascript
var createPointCB = require('create-point-cb'),
    myPoint = {},
    pointCB = createPointCB(myPoint);

window.addEventListener('mousemove', pointCB, false);
window.addEventListener('touchmove', pointCB, false);
```

About
-----

Any object you pass to `createPointCB` will get these properties:

-	x (the document window x coordinate)
-	y (the document window y coordinate)
-	target (the current event.target)
-	element (this value inside the event callback)
-	pageX (the event.pageX value)
-	pageY (thie event.pageY value)
-	type (the event.type)

Use `create-point-cb` with any DOM event that will have `clientX`, or `clientY` properties. This usually would be **mousemove**, or the **touchmove** event on the `window` object.

Happy coding. :)

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