export default function (fn, limit = 250) {
  let wait = false

  return function (...args) {
    if (wait) {
      return
    }

    wait = true
    fn.apply(this, args)
    setTimeout(() => {
      wait = false
    }, limit)
  }
}

@@ -55,16 +55,29 @@
  = false
+%0A  let result
 %0A%0A  retu
@@ -128,16 +128,23 @@
   return
+ result
 %0A    %7D%0A%0A
@@ -162,16 +162,25 @@
 true%0A   
+ result =
  fn.appl
@@ -235,16 +235,16 @@
 = false%0A
-
     %7D, l
@@ -249,14 +249,32 @@
  limit)%0A
+    return result%0A
   %7D%0A%7D%0A

make throttle return last return value of throttled function (#2246)