# @helpusersvote/logic

> Simple JavaScript APIs to help your users vote

Latest version **1.0.14** (published 2018-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @helpusersvote/logic
pnpm add @helpusersvote/logic
yarn add @helpusersvote/logic
bun add @helpusersvote/logic
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.14 |
| Published | 2018-10-08 |
| First published | 2018-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 27.1 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | UserMirror |
| Maintainers | fouad |

## Links

- npm: https://www.npmjs.com/package/@helpusersvote/logic
- Repository: https://github.com/helpusersvote/modules
- Homepage: https://helpusersvote.com/docs/api?library=javascript
- Issues: https://github.com/helpusersvote/modules/issues
- npm.io page: https://npm.io/package/@helpusersvote/logic

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.18.0
- [dayjs](https://npm.io/package/dayjs.md) ^1.6.4
- [in-us](https://npm.io/package/in-us.md) 0.0.2

## Recent versions

- 1.0.14 (latest) — 2018-10-08
- 1.0.13 — 2018-10-08
- 1.0.12 — 2018-10-08
- 1.0.10 — 2018-10-08
- 1.0.9 — 2018-10-08
- 1.0.8 — 2018-10-08
- 1.0.7 — 2018-10-08
- 1.0.6 — 2018-09-02
- 1.0.5 — 2018-09-02
- 1.0.4 — 2018-09-01
- 1.0.3 — 2018-08-31
- 1.0.2 — 2018-08-31
- 1.0.1 — 2018-08-31

## README

# @helpusersvote/logic

JavaScript functions to check if a call-to-action should be rendered

## Installation

First, add the module to your codebase:

```bash
npm install --save @helpusersvote/logic
```

## Usage

In your app, import functions from the `@helpusersvote/logic` module:

```javascript
import { shouldShowCTA } from '@helpusersvote/logic'

// Optional `regions` configuration, defaults to USA
const regions = [
  'city:San Francisco',
  'state:California',
  'country:USA'
]

// wherever you want to render the call-to-action
if (shouldShowCTA({ regions })) {
  // render a custom banner or use `@helpuservote/copy`
}
```

## License

All modules are open-sourced under the [MIT License](https://github.com/helpusersvote/modules/blob/master/license)

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