@use-it/event-listener
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "A custom React Hook that provides a useEventListener.", | ||
@@ -13,2 +13,3 @@ "main": "dist/event-listener.js", | ||
"source": "src/index.js", | ||
"types": "types/index.d.ts", | ||
"license": "MIT", | ||
@@ -15,0 +16,0 @@ "repository": { |
# @use-it/event-listener | ||
A custom React Hook thst provides a declarative useEventListener. | ||
A custom React Hook that provides a declarative useEventListener. | ||
[![npm version](https://badge.fury.io/js/%40use-it%2Fevent-listener.svg)](https://badge.fury.io/js/%40use-it%2Fevent-listener) [![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors) | ||
[![npm version](https://badge.fury.io/js/%40use-it%2Fevent-listener.svg)](https://badge.fury.io/js/%40use-it%2Fevent-listener) [![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors) | ||
@@ -40,7 +40,7 @@ This hook was inspired by [Dan Abramov](https://github.com/gaearon)'s | ||
| Parameter | Description | | ||
| :---------- | :---------------------------------------------------------------------------------------------------------------- | | ||
| `eventName` | The event name (string). Here is a list of [commoon events](https://developer.mozilla.org/en-US/docs/Web/Events). | | ||
| `handler` | A function that will be called whenever `eventName` fires on `element`. | | ||
| `element`\* | An optional element to listen on. Defaults to `global` (i.e., `window`). | | ||
| Parameter | Description | | ||
| :---------- | :--------------------------------------------------------------------------------------------------------------- | | ||
| `eventName` | The event name (string). Here is a list of [common events](https://developer.mozilla.org/en-US/docs/Web/Events). | | ||
| `handler` | A function that will be called whenever `eventName` fires on `element`. | | ||
| `element`\* | An optional element to listen on. Defaults to `global` (i.e., `window`). | | ||
@@ -107,6 +107,6 @@ ### Return | ||
<!-- prettier-ignore --> | ||
| [<img src="https://avatars3.githubusercontent.com/u/887639?v=4" width="100px;" alt="Donavon West"/><br /><sub><b>Donavon West</b></sub>](http://donavon.com)<br />[🚇](#infra-donavon "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/donavon/use-event-listener/commits?author=donavon "Tests") [💡](#example-donavon "Examples") [🤔](#ideas-donavon "Ideas, Planning, & Feedback") [🚧](#maintenance-donavon "Maintenance") [👀](#review-donavon "Reviewed Pull Requests") [🔧](#tool-donavon "Tools") [💻](https://github.com/donavon/use-event-listener/commits?author=donavon "Code") | [<img src="https://avatars3.githubusercontent.com/u/8732191?v=4" width="100px;" alt="Kevin Kipp"/><br /><sub><b>Kevin Kipp</b></sub>](https://github.com/third774)<br />[💻](https://github.com/donavon/use-event-listener/commits?author=third774 "Code") | | ||
| :---: | :---: | | ||
| [<img src="https://avatars3.githubusercontent.com/u/887639?v=4" width="100px;" alt="Donavon West"/><br /><sub><b>Donavon West</b></sub>](http://donavon.com)<br />[🚇](#infra-donavon "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/donavon/use-event-listener/commits?author=donavon "Tests") [💡](#example-donavon "Examples") [🤔](#ideas-donavon "Ideas, Planning, & Feedback") [🚧](#maintenance-donavon "Maintenance") [👀](#review-donavon "Reviewed Pull Requests") [🔧](#tool-donavon "Tools") [💻](https://github.com/donavon/use-event-listener/commits?author=donavon "Code") | [<img src="https://avatars3.githubusercontent.com/u/8732191?v=4" width="100px;" alt="Kevin Kipp"/><br /><sub><b>Kevin Kipp</b></sub>](https://github.com/third774)<br />[💻](https://github.com/donavon/use-event-listener/commits?author=third774 "Code") | [<img src="https://avatars1.githubusercontent.com/u/1288694?v=4" width="100px;" alt="Justin Hall"/><br /><sub><b>Justin Hall</b></sub>](https://github.com/wKovacs64)<br />[💻](https://github.com/donavon/use-event-listener/commits?author=wKovacs64 "Code") [📖](https://github.com/donavon/use-event-listener/commits?author=wKovacs64 "Documentation") | | ||
| :---: | :---: | :---: | | ||
<!-- ALL-CONTRIBUTORS-LIST:END --> | ||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
8768
7
17
0