PageRenderTime 19ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/babel-polyfill/node_modules/core-js/library/modules/es7.asap.js

https://bitbucket.org/worklabschd/bingle_customer2
JavaScript | 12 lines | 10 code | 1 blank | 1 comment | 2 complexity | 024c60c8d8b3c246cbb5ca409bc7ada7 MD5 | raw file
 1// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
 2var $export = require('./_export');
 3var microtask = require('./_microtask')();
 4var process = require('./_global').process;
 5var isNode = require('./_cof')(process) == 'process';
 6
 7$export($export.G, {
 8  asap: function asap(fn) {
 9    var domain = isNode && process.domain;
10    microtask(domain ? domain.bind(fn) : fn);
11  }
12});