|
|
|
@ -2,14 +2,13 @@
|
|
|
|
|
|
|
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
Create two functions that will work like `_.throttle` from lodash |
|
|
|
|
Create two functions that will work like `_.throttle` from lodash. |
|
|
|
|
|
|
|
|
|
- `throttle`, this function doesn't need to take care of the options |
|
|
|
|
- `opThrottle`, this function will take care of |
|
|
|
|
the `trailing` and `leading` options |
|
|
|
|
- `throttle`: don't worry about the options. |
|
|
|
|
- `opThrottle`: implement the `trailing` and `leading` options. |
|
|
|
|
|
|
|
|
|
### Notions |
|
|
|
|
|
|
|
|
|
- [lodash.com/docs/4.17.15#throttle](https://lodash.com/docs/4.17.15#throttle) |
|
|
|
|
- [https://css-tricks.com/debouncing-throttling-explained-examples/#throttle](https://css-tricks.com/debouncing-throttling-explained-examples/#throttle) |
|
|
|
|
- [https://stackoverflow.com/questions/24079736/confused-about-the-maxwait-option-for-lodashs-debounce-method](https://stackoverflow.com/questions/24079736/confused-about-the-maxwait-option-for-lodashs-debounce-method) |
|
|
|
|
- [lodash throttle](https://lodash.com/docs/4.17.15#throttle) |
|
|
|
|
- [css-tricks throttle](https://css-tricks.com/debouncing-throttling-explained-examples/#throttle) |
|
|
|
|
- [stackoverflow about lodash debounce](https://stackoverflow.com/questions/24079736/confused-about-the-maxwait-option-for-lodashs-debounce-method) |
|
|
|
|