https://github.com/deuscx/idle-scheduler
a simple way to execute task with requestIdleCallback
https://github.com/deuscx/idle-scheduler
performance requestidlecallback scheduler typescript
Last synced: about 1 year ago
JSON representation
a simple way to execute task with requestIdleCallback
- Host: GitHub
- URL: https://github.com/deuscx/idle-scheduler
- Owner: Deuscx
- License: mit
- Created: 2023-12-10T07:46:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-10T22:07:14.000Z (over 2 years ago)
- Last Synced: 2025-02-18T06:50:26.498Z (about 1 year ago)
- Topics: performance, requestidlecallback, scheduler, typescript
- Language: TypeScript
- Homepage:
- Size: 349 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# idle-scheduler
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![GitHub][license-shield]][license-url]
## Getting Started
## Installation
```bash
pnpm install idle-scheduler
```
## Usage
```ts
const queue = new IdleQueue()
tasks.forEach((task) => {
queue.add(task)
})
queue.run()
```
See the [open issues](https://github.com/deuscx/idle-scheduler/issues) for a full list of proposed features (and known issues).
you can see the [playground](./playground) example
https://github.com/Deuscx/idle-scheduler/assets/48537979/7984e261-16df-4f16-a58a-f77230f0894f
## License
Distributed under the MIT License. See [`LICENSE`](./LICENSE) for more information.
[contributors-shield]: https://img.shields.io/github/contributors/deuscx/idle-scheduler.svg?style=for-the-badge
[contributors-url]: https://github.com/deuscx/idle-scheduler/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/deuscx/idle-scheduler.svg?style=for-the-badge
[forks-url]: https://github.com/deuscx/idle-scheduler/network/members
[stars-shield]: https://img.shields.io/github/stars/deuscx/idle-scheduler.svg?style=for-the-badge
[stars-url]: https://github.com/deuscx/idle-scheduler/stargazers
[issues-shield]: https://img.shields.io/github/issues/deuscx/idle-scheduler.svg?style=for-the-badge
[issues-url]: https://github.com/deuscx/idle-scheduler/issues
[license-shield]: https://img.shields.io/github/license/deuscx/idle-scheduler?style=for-the-badge
[license-url]: https://github.com/deuscx/idle-scheduler/blob/master/LICENSE