All files / src helpers.js

21.05% Statements 4/19
100% Branches 0/0
20% Functions 3/15
15.38% Lines 2/13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37  86x 308x                                                                    
export function actionIs(actionName) {
  return function () {
      return this.filter(({ action, streamName }) => action === actionName);
  };
}
 
export function parentIs(awaitedName) {
  console.error('This function is deprecated, use `nameIs` instead')
  return function () {
    return this.filter(({streamName}) => streamName === awaitedName);
  };
}
 
export function nameIs(awaitedName) {
  return function () {
    return this.filter(({streamName}) => streamName === awaitedName);
  };
}
 
export function filter(cond) {
  return function () {
    return this.filter(cond);
  };
}
 
export function debounce(time) {
  return function () {
    return this.debounce(time);
  };
}
 
export function throttle(time) {
  return function () {
    return this.throttle(time);
  };
}