{"library":"rafu","type":"library","category":null,"description":"rafu is a lightweight JavaScript utility that provides a `requestAnimationFrame` shim and enhanced animation scheduling capabilities. It ensures that animations run smoothly and efficiently across different browser environments by offering a robust fallback for `requestAnimationFrame` where native support might be missing or prefixed. Beyond merely polyfilling, rafu includes a `throttled` utility for synchronizing function calls with the browser's repaint cycle, which is crucial for performance-sensitive tasks like scroll handling, resize events, or continuous input processing. The package is currently at version 1.2.0, with its latest update introducing explicit cancellation methods for both direct `rafu` calls and functions created with `rafu.throttled`. Its minimal footprint and focused functionality make it a straightforward choice for projects needing basic `requestAnimationFrame` management without introducing heavy dependencies.","language":"javascript","status":"active","version":"1.2.0","tags":["javascript","animation","frame","throttle"],"install":[{"cmd":"npm install rafu","imports":["import rafu from 'rafu';","import rafu from 'rafu';\nconst handle = rafu(() => {});\nrafu.cancel(handle);","import rafu from 'rafu';\nconst throttledScroll = rafu.throttled(() => {});"]},{"cmd":"yarn add rafu","imports":[]},{"cmd":"pnpm add rafu","imports":[]}],"homepage":null,"github":"https://github.com/danro/rafu","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/rafu","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/rafu/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}