old_contents: export default function (fn) {
    var called = false;
  
    return function (...args) {
      if (!called) {
        called = true;
        setTimeout(() => {
          called = false;
          fn.apply(this, args);
        }, 1);
      }
    };
  }
  
new_contents: const raf = requestAnimationFrame || setTimeout;
  export default function (fn) {
    var called = false;
  
    return function (...args) {
      if (!called) {
        called = true;
        raf(() => {
          called = false;
          fn.apply(this, args);
        });
      }
    };
  }
  
subject: Update debounce() to use requestAnimationFrame() if available.