Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 306 Bytes

Readme.md

File metadata and controls

26 lines (18 loc) · 306 Bytes

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