User Loyalty
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
UserLoyaltystart location UserLoyalty console
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