250x250
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- 경동
- IOT
- ReactNative
- node.js
- 라온익스
- 난방비절약
- todoist
- debounce
- 에버노트
- rasppi3
- 기름보일러
- Swipes
- 온도조절기
- 나비엔
- 린나이온도조절기
- 네모안
- react-native
- nodejs
- 가스요금폭탄
- Raspberry Pi
- EditText
- npm moment
- Node
- 가스비절약
- anydo
- evernote
- 온도센서
- REACT
- __attribute__
- xcode11
Archives
- Today
- Total
어허
debounce - Promise 본문
728x90
export function debouncePromise(f, i) {
let t = null;
return (…args) => {
clearTimeout(t);
return new Promise(resolve => {
t = setTimeout(() => resolve(f(…args)), i);
});
};
}
출처 : stackoverflow 어딘가에서 보고 사용한건데 기억이 안남
728x90
Comments