# @findify/helpers

> ``` npm install @findify/helpers --save ``` or ``` yarn add @findify/helpers ``` Alternatively, you can use UMD builds, by requiring them to the page using `` tag: ``` https://findify-assets-2bveeb6u8ag.netdna-ssl.com/helpers-js/findify-helpers.0.

Latest version **1.1.2** (published 2018-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @findify/helpers
pnpm add @findify/helpers
yarn add @findify/helpers
bun add @findify/helpers
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2018-04-12 |
| First published | 2017-09-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Findify |
| Maintainers | findify |

## Links

- npm: https://www.npmjs.com/package/@findify/helpers
- Repository: https://github.com/findify/findify-js/tree/master/packages/helpers
- npm.io page: https://npm.io/package/@findify/helpers

## Dependencies (4)

- [redux](https://npm.io/package/redux.md) ^3.7.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [redux-saga](https://npm.io/package/redux-saga.md) ^0.15.4
- [findify-sdk](https://npm.io/package/findify-sdk.md) 1.3.9

## Recent versions

- 1.1.2 (latest) — 2018-04-12
- 1.1.1 — 2018-02-12
- 1.1.0 — 2018-01-26
- 1.0.1 — 2017-09-26
- 1.0.0 — 2017-09-26

## README

# Getting started
## Installation
```
npm install @findify/helpers --save
```
or
```
yarn add @findify/helpers
```
Alternatively, you can use UMD builds, by requiring them to the page using `<script>` tag:
```
https://findify-assets-2bveeb6u8ag.netdna-ssl.com/helpers-js/findify-helpers.0.1.29.min.js
```
or using unminified version:
```
https://findify-assets-2bveeb6u8ag.netdna-ssl.com/helpers-js/findify-helpers.0.1.29.js
```

## Usage example
```javascript
var FindifyHelpers = require('@findify/helpers');

// First, you need to create one of store instances:
var searchStore = FindifyHelpers.createSearch({
  key: 'b9h348b89h439g43',
  // If you are using this library on a frontend, it will be convenient for you to provide user once on initialization.
  // You can get user object, using `@findify/analytics` library, or by manually getting data from cookies:
  user: {
    uid: 'f892hf2938f2g9p2',
    sid: 'g2984hg2jg9823g9'
  }
});

// After you can emit events
searchStore.emit({
  name: 'search',
  payload: {
    query: 'white t-shirt'
  }
}).emit({
  name: 'request',
});

// And subscribe on store changes
searchStore.subscribe(function(event) {
  if (event.name === 'request') {
    // handle requestBody data
    var requestBody = searchStore.get('request');
  }

  if (event.name === 'responseSuccess') {
    // handle responseBody data
    var responseBody = searchStore.get('response');
  }
});
```

# Documentation
- [API Reference](https://findify.readme.io/reference#initialization)

# License
MIT

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