You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
531 B

## Throttle
5 years ago
### Instructions
Create two functions that will work like `_.throttle` from lodash.
- `throttle`: don't worry about the options.
- `opThrottle`: implement the `trailing` and `leading` options.
5 years ago
### Notions
- [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)