# @oliverphaser/nativescript-eventify

> Enables programmatic execution of gesture events in NativeScript applications. Forked from mudlabs and updated for NativeScript 8.

Latest version **1.0.13** (published 2022-10-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @oliverphaser/nativescript-eventify
pnpm add @oliverphaser/nativescript-eventify
yarn add @oliverphaser/nativescript-eventify
bun add @oliverphaser/nativescript-eventify
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2022-10-22 |
| First published | 2022-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 56.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | oliverphaser |
| Maintainers | oliverphaser |
| Keywords | NativeScript, JavaScript, Android, iOS, Gestures, Events |

## Links

- npm: https://www.npmjs.com/package/@oliverphaser/nativescript-eventify
- Repository: https://github.com/oliverphaser/nativescript-eventify
- Issues: https://github.com/oliverphaser/nativescript-eventify/issues
- npm.io page: https://npm.io/package/@oliverphaser/nativescript-eventify

## 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.13 (latest) — 2022-10-22
- 1.0.12 — 2022-10-22
- 1.0.11 — 2022-10-22
- 1.0.10 — 2022-03-15
- 1.0.9 — 2022-03-15
- 1.0.8 — 2022-03-15
- 1.0.7 — 2022-03-15
- 1.0.6 — 2022-03-15
- 1.0.5 — 2022-03-05
- 1.0.4 — 2022-03-05
- 1.0.3 — 2022-03-05
- 1.0.2 — 2022-03-05
- 1.0.1 — 2022-03-05
- 1.0.0 — 2022-03-05

## README

[npm]: https://img.shields.io/npm/v/@oliverphaser/nativescript-eventify.svg?color=949393
[apple]: https://img.shields.io/badge/apple-%E2%9C%93-949393.svg?logo=apple&logoColor=white
[android]: https://img.shields.io/badge/android-%E2%9C%93-949393.svg?logo=android&logoColor=white
[support]: https://img.shields.io/static/v1.svg?logo=paypal&label=Support&message=oliverphaser&style=for-the-badge&color=0c67b5&labelColor=afb0b9

[![npm]](https://www.npmjs.com/package/@oliverphaser/nativescript-eventify)
![apple]
![android]
<br/>
[![support]](https://paypal.me/oliverphaser)

# NativeScript Eventify

NativeScript has a method called `notify` you can use to notify an observable of changes. But you can't use it to trigger events like `tap` or `swipe`, enter NativeScript Eventify.

## NativeScript 8

This will work only on NativeScript 8.

## Supported Events

 - `tap`

## Roadmap

 - Add support for `doubleTap` events
 - Add support for `longPress` events
 - Add support for `swipe` events
 - Add support for `pan` events
 - Add support for `pinch` events
 - Add support for `rotate` events
 - Add support for `touch` events

## Installation

```
ns plugin add @oliverphaser/nativescript-eventify
```

## Usage 

Just require it once.
```js
//app.js
require("@oliverphaser/nativescript-eventify");
```

```js
/**
* home-page.js
*
* Assume the view already has the event listner(s) setup.
*/

// Simulates a tap event
view.eventify({ eventName: "tap", object: view });
```

Take a look at this [Playground](https://play.nativescript.org/?template=play-js&id=PpA1wb&v=6) for a working example.

## API

| Properties | Required | Description |
| --- | --- | --- |
| EventData | Yes | The eventName and object, just like using `notify`. |
| Info | Sometimes | Some of the events _(i.e. `swipe`)_ will need extra information |

### Info

| Event | Required | Properties | Description |
| --- | --- | --- | --- |
| tap | No | n/a | n/a |

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