2.0.6 • Published 3 years ago

@twoavy/idle-timer v2.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

idle-timer

A Vue plugin to track idle time

Installation

npm i @twoavy/idle-timer
OR
yarn add @twoavy/idle-timer
import idleTimer from 'idle-timer';

Usage

####Initialize (main.js)

app.use(idleTimer, {
    idleTime: 30, // secs
    trigger: ['mousedown', 'touchstart']
})

####In component (within setup)

// idle event
const idleTimer = inject('idle-timer')
idleTimer.emitter.on('idle', () => {
    console.log('idle')
})

// restart
idleTimer.restart()
2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.6

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago