user-loyalty

0.0.2 • Public • Published

User Loyalty Build Status

Test Facebook's Doomsday scenario against your users to determine their loyalty to your application.

It prevents users accessing your application by disabling XMLHttpRequests (AJAX). The test can be stopped and you can see how many times the user tried to access your application.

Demo

http://dunckr.github.io/user-loyalty/example/

Usage

import UserLoyalty from 'user-loyalty'
 
UserLoyalty.start()
 
location.reload()
 
UserLoyalty.stop()
 
console.log(UserLoyalty.results())

API

UserLoyalty.start()

Prevents off XMLHttpRequests and begins logging the number of times the application is refreshed. Clears any statistics held about the user.

UserLoyalty.stop()

Re-enables XMLHttpRequests.

UserLoyalty.statistics()

Returns the number of times the application had been refreshed during the testing scenario.

UserLoyalty.active()

Returns whether testing scenario is currently in progress.

Installation

npm install user-loyalty --save

Dev

npm run start

Test

npm run test

Build

npm run build

License

MIT © Duncan Beaton

Readme

Keywords

Package Sidebar

Install

npm i user-loyalty

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • dunckr