Skip to content

Releases: NPM-Workbench/micro-throttle-js

Version 1.0.0

05 Mar 03:51

Choose a tag to compare

Official Public Release: https://www.npmjs.com/package/micro-throttle-js
Done after the initial 0.9.0 Beta 1 Launch. No other changes in the code done. No breaking changes.

Version 0.9.0-beta.1

27 Feb 05:51
b97eefd

Choose a tag to compare

🧸 A tiny, type-safe throttle utility for modern JavaScript and TypeScript. Like a water dam regulating a powerful river β€” micro-throttle-js controls the flow of your function calls.

🌊 High frequency events like scroll, resize, mousemove, rapid API triggers etc., can overwhelm your application. Just like a dam regulates water flow to prevent flooding, micro-throttle-js regulates how often your function executes.

No chaos. No overflow. Just controlled release.

πŸ“— Test Coverage

PASS src/micro-throttle/test/index.test.ts
  microThrottle
    βœ“ throws when delay is negative
    βœ“ throws when delay is not finite
    βœ“ calls once immediately and throttles calls within delay
    βœ“ preserves this context
    βœ“ works with zero delay
    βœ“ throws when delay is Infinity
    βœ“ separate instances do not share throttle state

Test Suites: 1 passed, 1 total
Tests:       7 passed, 7 total
Snapshots:   0 total
----------|---------|----------|---------|---------|-------------------
File      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files |     100 |      100 |     100 |     100 |
 index.ts |     100 |      100 |     100 |     100 |
----------|---------|----------|---------|---------|-------------------

Published on NPM: https://www.npmjs.com/package/micro-throttle-js