https://github.com/cnlon/next-job
Another environment agnostic nextTick polyfill
https://github.com/cnlon/next-job
job microtask mutationobserver nexttick setimmediate settimeout vue
Last synced: 6 months ago
JSON representation
Another environment agnostic nextTick polyfill
- Host: GitHub
- URL: https://github.com/cnlon/next-job
- Owner: cnlon
- License: mit
- Created: 2017-04-20T14:23:18.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-28T02:33:39.000Z (about 8 years ago)
- Last Synced: 2025-08-22T05:24:58.080Z (7 months ago)
- Topics: job, microtask, mutationobserver, nexttick, setimmediate, settimeout, vue
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# next-job
[](https://travis-ci.org/cnlon/next-job)
[](https://badge.fury.io/js/next-job)
[](http://standardjs.com)
## Another environment agnostic nextTick polyfill
To be used in environment agnostic modules that need nextTick functionality.
- When run in Node.js `process.nextTick` is used
- In modern browsers microtask resolution is guaranteed by `MutationObserver` [93.82%](http://caniuse.com/#search=MutationObserver)]
- In other engines `setTimeout(fn)` is used as fallback
## Installation
```bash
npm install --save next-job
```
## Syntax
```
nextJob(func[, context, param1, param2, ...])
```
**func**
A function to be executed.
**context** [Optional]
The context to be bound by `func`.
**param1, param2, ..., paramN** [Optional]
Additional parameters which are passed through to `func`.
Stealed from [Vue.js](https://github.com/vuejs/vue/blob/dev/src/core/util/next-tick.js) and [next-tick](https://github.com/medikoo/next-tick).