const nextTick = (() => {
  if (typeof setImmediate === 'function') {
    return task => setImmediate(task);
  }

  if (typeof process === 'object' && typeof process.nextTick === 'function') {
    return task => process.nextTick(task);
  }

  if (typeof MessageChannel === 'function') {
    // http://www.nonblocking.io/2011/06/windownexttick.html
    const channel = new MessageChannel();
    let head = {};
    let tail = head;

    channel.port1.onmessage = () => {
      head = head.next;
      const task = head.task;
      delete head.task;
      task();
    };

    return task => {
      tail = tail.next = { task };
      channel.port2.postMessage(0);
    };
  }

  return task => setTimeout(task, 0);
})();

export default nextTick;

@@ -77,24 +77,32 @@
 turn task =%3E
+ %7B%0A     
  setImmediat
@@ -102,32 +102,39 @@
 mmediate(task);%0A
+    %7D;%0A
   %7D%0A%0A  if (typeo
@@ -219,16 +219,24 @@
  task =%3E
+ %7B%0A     
  process
@@ -252,16 +252,23 @@
 (task);%0A
+    %7D;%0A
   %7D%0A%0A  i
@@ -712,16 +712,22 @@
  task =%3E
+ %7B%0A   
  setTime
@@ -740,16 +740,21 @@
 sk, 0);%0A
+  %7D;%0A
 %7D)();%0A%0Ae

Change returns