Skip to content

cnlon/next-job

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

next-job

Build Status npm version js-standard-style

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%]
  • In other engines setTimeout(fn) is used as fallback

Installation

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 and next-tick.