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
- 네모안
- Raspberry Pi
- 가스요금폭탄
- 가스비절약
- 기름보일러
- 경동
- todoist
- npm moment
- node.js
- REACT
- anydo
- 온도조절기
- IOT
- react-native
- 에버노트
- 난방비절약
- Swipes
- EditText
- xcode11
- nodejs
- Node
- 온도센서
- ReactNative
- 라온익스
- __attribute__
- rasppi3
- 나비엔
- evernote
- debounce
- 린나이온도조절기
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