0.2.2 • Published 6 years ago

@helpusersvote/election-logic v0.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

@helpusersvote/election-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/election-logic

Usage

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

import { shouldShowCTA } from '@helpusersvote/election-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/election-copy`
}

License

All modules are open-sourced under the MIT License

0.2.2

6 years ago

0.2.1

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago