https://github.com/kwonoj/rxjs-requestidlecallback-scheduler
RxJS 5 schedule implementation supports schedule into requestIdleCallback
https://github.com/kwonoj/rxjs-requestidlecallback-scheduler
Last synced: over 1 year ago
JSON representation
RxJS 5 schedule implementation supports schedule into requestIdleCallback
- Host: GitHub
- URL: https://github.com/kwonoj/rxjs-requestidlecallback-scheduler
- Owner: kwonoj
- License: mit
- Created: 2017-06-24T06:16:47.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-25T05:06:20.000Z (about 9 years ago)
- Last Synced: 2025-04-20T17:41:42.556Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 35.2 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/kwonoj/rxjs-requestidlecallback-scheduler)
[](https://www.npmjs.com/package/rxjs-requestidlecallback-scheduler)
# rxjs-requestidlecallback-scheduler
`rxjs-requestidlecallback-scheduler` provides scheduler implementation to [`requestIdleCallback`](https://developer.mozilla.org/en/docs/Web/API/Window/requestIdleCallback). Scheduling behavior follows `AnimationFrameScheduler` while actions are schduled via requestIdleCallback instead.
# Install
This has a peer dependencies of `rxjs@5.*.*`, which will have to be installed as well
```sh
npm install --save-dev rxjs-requestidlecallback-scheduler
```
# Usage
```js
import { idle } from `rxjs-requestidlecallback-scheduler`
Observable.of(true).subscribeOn(idle)...;
```
# Building / Testing
Few npm scripts are supported for build / test code.
- `build`: Transpiles code to ES5 commonjs to `dist`.
- `build:clean`: Clean up existing build
- `test`: Run unit test. It's tailored for CI environment (Browser, coverage config)
- `lint`: Run lint over all codebases
- `lint:staged`: Run lint only for staged changes. This'll be executed automatically with precommit hook.
- `commit`: Commit wizard to write commit message