swc/crates/swc_ecma_minifier/tests/fixture/issues/7412/output.js
2023-05-19 13:35:50 +09:00

9 lines
251 B
JavaScript

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