Files
flights_web_raw/ClientApp/node_modules/throttleit
gnezim 0a5ab058a6 Initial commit: Aeroflot Flights Web - Angular 12 baseline
- Angular 12 application with PrimeNG components
- 5 existing Cypress e2e test suites
- SCSS styling with BEM naming convention
- i18n support (10 languages)
- Leaflet map integration
- Complete component hierarchy and routing structure

This baseline will be used for Angular → React migration.
2026-04-05 18:47:57 +03:00
..

throttle

Throttle a function

Installation

$ component install component/throttle
$ npm install throttleit

Example

// with component:
var throttle = require('throttle');
// with npm: 
// var throttle = require('throttleit');

window.onresize = throttle(resize, 200);

function resize(e) {
  console.log('height', window.innerHeight);
  console.log('width', window.innerWidth);
}

API

throttle(fn, wait)

Creates a function that will call fn at most once every wait milliseconds.

Supports leading and trailing invocation.

fn will receive last context (this) and last arguments passed to a throttled wrapper before fn was invoked.

License

MIT