swc/crates/swc_ecma_minifier/tests/fixture/issues/7412/output.js

9 lines
251 B
JavaScript
Raw Normal View History

export function throttleTime(interval) {
let currentValue, timeout;
return (done)=>(value)=>{
currentValue = value, timeout || (timeout = setTimeout(()=>{
done(currentValue);
}, interval));
};
}