0.0.2 • Published 1 year ago

hamid.js v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

HAMID.js

Mutation testing badge Known Vulnerabilities codecov npm

A library that triggers an action if the user is inactive after a period of time.

Use cases

Banking and payment services

PSD 2 regulation for example requires logging out the user if they're inactive for 5 minutes

The automatic logout after five minutes of inactivity is a regulatory requirement for banks and payment service providers under the PSD 2 regulation to increase security in online banking. See article 4(3)(d) of the DELEGATED REGULATION (EU) 2018/389 (RTS), https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32018R0389&from=EN ("the maximum time without activity by the payer after being authenticated for accessing its payment account online shall not exceed 5 minutes."). [commerzbank]

Chat and online games

Online chat rooms, and games may have a requirement of triggering an action if a user is inactive for a set period of time.

Usage

Install the library using npm with npm i hamid.js, or you can use it from a CDN with:

    <script src="https://unpkg.com/browse/hamid.js@0.0.1/dist/lib.js"></script>

Then in your script

      const logMeOut = () => alert('You shall be logged out my friend');
      new Hamid(logMeOut);

Origin of the library's name

It's a local meme in Algeria, especially in Oran. It's a scene from a famous comedy show called "Bila Houdoud" where a bus driver asked his tickets man (Hamid) to kick-out someone.

Hamid Ser7ah from Bila Houdoud

License

MIT

0.0.2

1 year ago

0.0.1

1 year ago