Sha256: b9abbf9ea20d3b9353742d53782e8f6051a255785c3ea705d7eea40c6c3cd9a2
Contents?: true
Size: 542 Bytes
Versions: 45
Compression:
Stored size: 542 Bytes
Contents
"use strict"; var ensurePlainFunction = require("../../object/ensure-plain-function") , ensureThenable = require("../../object/ensure-thenable") , microtaskDelay = require("../../function/#/microtask-delay"); module.exports = function (callback) { ensureThenable(this); ensurePlainFunction(callback); // Rely on microtaskDelay to escape eventual error swallowing this.then( microtaskDelay.call(function (value) { callback(null, value); }), microtaskDelay.call(function (reason) { callback(reason); }) ); };
Version data entries
45 entries across 45 versions & 2 rubygems