microtask-delay.js 398 B

123456789101112
  1. "use strict";
  2. var ensurePlainFunction = require("../../object/ensure-plain-function")
  3. , defineLength = require("../_define-length")
  4. , nextTick = require("next-tick");
  5. var apply = Function.prototype.apply;
  6. module.exports = function () {
  7. var src = ensurePlainFunction(this);
  8. return defineLength(function () { nextTick(apply.bind(src, this, arguments)); }, this.length);
  9. };