1.0.4 • Published 6 years ago

snooze.callback v1.0.4

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

snooze-callback

Snooze Callback to call when time is up. It will help to avoid redundancy work such as hitting database query, or network call. We used this package to future schedule events.

debug

set environment: DEBUG="snooze*"

example

const { watch, intervalTime, cancel } = require('./index');

intervalTime(1000);
const timeObj = {
        '2018-10-10T16:12:48.761Z': { context: this, data: "hello world"},
        '2018-10-10T16:14:46.761Z': { someFun: () => console.log('yay',timeObj), data: "hello world"}
}

watch( timeObj, function (error, data) { 
        if (error) return cancel() 
        console.log("Callback Trigger with param", data);
}, this);
1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago