code: function step(time, draw, start, rule, duration, end, anim) {
      if (typeof rule !== 'function') {
          throw new TypeError('Invalid animation rule:', rule);
      }
  
      let progress = time - start;
      let percent = progress / duration;
      let animationTransformed = 0;
  
      if (percent > 1) {
          percent = 1;
      }
  
      if (percent !== 1) {
          animationTransformed = rule(percent);
  
          // make sure we have correct number after applying animation
          // transformation
          if (isFinite(animationTransformed) && !isNaN(animationTransformed)) {
              percent = animationTransformed;
          }
      }
  
      draw && draw(percent);
  
      if (progress < duration) {
          anim.frame = requestAnimationFrame(time =>
              step(time, draw, start, rule, duration, end, anim)
          );
      }
  
      else {
          end && end();
          anim.inProgress = false;
      }
  }
docs: /* istanbul ignore next: private, not testable 
  Evaluates animation step and decides if the next step required or
  stops animation calling a proper events.
  
  @access private
  @param {number} time
  @param {DrawEventCallback} draw
  @param {number} start
  @param {AnimationRule} rule
  @param {number} duration
  @param {EndEventCallback} end
  @param {Animation} anim