debounce

Ver +bf-0.01.4

debounce controls the execution of actions based on a period of inactivity, It makes the actions wait until nothing is happening.

This action is based on https://lodash.com/docs/4.17.15#debounce

Actions that follow the throttle action will be queued until the wait time expires and there is no namedAction key.

// example debounce action object
{
  "action": "debounce",
  "options": {
    "name": "myDebounce1",
    "leading": false,
    "trailing": true,
    "wait": 600
  }
},{
  ... more actions to run later
}

// example calling a namedAction
{
  "action": "debounce",
  "options": {
    "name": "myDebounce2",
    "wait": 600,
    "namedAction" : "saveApplication"
  }
} // no more actinos after here

Last updated