Skip to content

stephenmathieson-boneyard/defer-fn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

defer-fn

Defer the execution of a function.

Example

var assert = require('assert');
var defer = require('defer-fn');

var x = 1;
var deferred = defer(function() {
  x = 7;
}, 10);

deferred();
assert.equal(x, 1);
setTimeout(function(){
  assert.equal(x, 7);
}, 11);

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published