Skip to content

timoxley/next-tick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

next-tick

process.nextTick for browser.

Installation

$ component install timoxley/next-tick

Example

// This example sucks.

var nextTick = require('next-tick')

var i = 0;

nextTick(function() {
	i++ // i === 2
})

i++ // i === 1

Further reading

This implementation mirrors the behaviour of node's process.nextTick. Therefore, it comes with all the same benefits and caveats. see node's documentation for details

Credit

Adapted from mocha codebase.

License

MIT

About

process.nextTick for browser

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •