# mouseleave

> mouseleave shim utility

Latest version **1.0.0** (published 2014-03-17) · 0 weekly downloads

## Install

```sh
npm install mouseleave
pnpm add mouseleave
yarn add mouseleave
bun add mouseleave
```

## 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 | 2014-03-17 |
| First published | 2014-03-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | stagas |
| Maintainers | shtylman |
| Keywords | mouse, mouseleave, events |

## Links

- npm: https://www.npmjs.com/package/mouseleave
- npm.io page: https://npm.io/package/mouseleave

## Dependencies (1)

- [component-event](https://npm.io/package/component-event.md) 0.1.3

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-03-17

## README

# mouseleave

mouseleave event emulation

## mouseleave(element, fn)

```js
var mouseleave = require('mouseleave');
var div = document.querySelector(...);

mouseleave(div, function(ev) {
    console.log('the mouse is here');
});
```

## unbind

`mouseleave` returns a function you can use to no longer react to mouseleave events. Call this function and the previously bound event will be unbound.

```js
var unbind = mouseleave(div, function(ev) {
    console.log('the mouse is here');
});

// will listen for mouseleave events

// call `unbind` to stop listening
unbind();
```

## testing

```
$ npm run test-local
```

Then open the url it gives you in a local browser.

## Licence

MIT

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