snooze.callback

1.0.4 • Public • Published

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);





Readme

Keywords

Package Sidebar

Install

npm i snooze.callback

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

3.92 kB

Total Files

5

Last publish

Collaborators

  • nasihere