@helpusersvote/logic

1.0.14 • Public • Published

@helpusersvote/logic

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

Installation

First, add the module to your codebase:

npm install --save @helpusersvote/logic

Usage

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

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

Readme

Keywords

none

Package Sidebar

Install

npm i @helpusersvote/logic

Weekly Downloads

1

Version

1.0.14

License

MIT

Unpacked Size

27.8 kB

Total Files

6

Last publish

Collaborators

  • fouad