clock-batch
Version 0.1.0
A custom batch timer to send push notifications to iPhone and Android
Installation
$ npm install clock-batch
API
Batch can also be included on any project and used programmatically.
add(delay, callback, callbackContext, options, type)
delay
- The number of milliseconds or a timestampcallback
- The callback that will be called when the timer event occurs.callbackContext
- The context in which the callback will be called.options
- The values to be sent to your callback function when it is called.type
- The type of delay is used a number or a date
remove(event)
event
- The event to remove from the queue.
Use:
// Load the modulevar batch = ; // Set the optionsvar options = "taskName": "Test" "date": "06-01-2017" "time": "11:13"; // For adding a eventvar event = batch; // For removing a eventbatch;
License
Peter Donders - Drukkerij Teeuwen