Releases: alexreardon/raf-schd
Releases · alexreardon/raf-schd
4.0.3
Fix: Adding missing MIT LICENSE
file
This project has always had an MIT license in the package.json
. However, there was a missing LICENSE
file. An MIT license has now been added. Thanks @mjchang and @PabloJomer!
4.0.2
- Upgrading to
[email protected]
#19 - Bumping all dev dependencies #19 👍
v4.0.1
4.0.0
Changes
No longer returning AnimationFrame
on WrappedFn
calls #12
This is a breaking change 💥
Old
const wrapped = rafSchd(console.log);
const frameId: AnimationFrameId = wrapped('hi');
// and you could do this:
cancelAnimationFrame(frameId);
// or you could have done this
wrapped.cancel();
New
const wrapped = rafSchd(console.log);
wrapped('hi'); // returns undefined
// now the only way to cancel the scheduled frame
wrapped.cancel();
This change brings this library in line with other rate limiting functions out there. The fact that it uses an animation frame internally is an implementation detail and does not need to leak out to the consumer. Rather than having two ways of cancelling a frame, we now just have one.
- type WrapperFn = (...args: any[]) => AnimationFrameID;
+ type WrapperFn = (...args: mixed[]) => void;
Engineering health
- moved from
eslint
toprettier
#12
v3.0.1
Changes
Bundle of love 🎁
We have added a number of new bundle options for your consumption pleasure!
dist/raf-schd.cjs.js
CommonJS bundledist/raf-schd.esm.js
ESM bundledist/raf-schd.js
UMD bundle (development)dist/raf-schd.min.js
UMD bundle (production)
This has been listed as a breaking change 💥 as the paths to the bundles have changed. There is no code behaviour or api changes