<commit_before>/**
 * chillout
 *
 * @description Reduce JavaScript CPU usage by asynchronous iteration
 * @version     1.0.1
 * @date        2016-01-06
 * @link        https://github.com/polygonplanet/chillout
 * @copyright   Copyright (c) 2016 polygon planet <<EMAIL>>
 * @license     MIT
 */

/*jshint bitwise:false, eqnull:true */
(function(name, context, factory) {

  // Supports AMD, Node.js, CommonJS and browser context
  if (typeof exports !== 'undefined') {
    if (typeof module !== 'undefined' && module.exports) {
      module.exports = factory();
    } else {
      exports[name] = factory();
    }
  } else if (typeof define === 'function' && define.amd) {
    define(factory);
  } else {
    context[name] = factory();
  }

}('chillout', this, function() {
  'use strict';

  var chillout = {};

  // nextTick implementation
  if (typeof setImmediate === 'function') {
    chillout.nextTick = function(callback) {
      setImmediate(callback);
    };
  } else if (typeof process === 'object' && typeof process.nextTick === 'function') {
    chillout.nextTick = function(callback) {
      process.nextTick(callback);
    };
  } else if (typeof MessageChannel === 'function') {
    chillout.nextTick = (function() {
      var queue = [];
      var channel = new MessageChannel();
      channel.port1.onmessage = function() {
        queue.shift()();
      };

      return function(callback) {
        queue.push(callback);
        channel.port2.postMessage('');
      };
    }());
  } else {
    chillout.nextTick = function(callback) {
      setTimeout(callback, 0);<commit_msg>Fix setImmediate by MessageChannel<commit_after>/**
 * chillout
 *
 * @description Reduce JavaScript CPU usage by asynchronous iteration
 * @version     1.0.1
 * @date        2016-01-15
 * @link        https://github.com/polygonplanet/chillout
 * @copyright   Copyright (c) 2016 polygon planet <<EMAIL>>
 * @license     MIT
 */

/*jshint bitwise:false, eqnull:true */
(function(name, context, factory) {

  // Supports AMD, Node.js, CommonJS and browser context
  if (typeof exports !== 'undefined') {
    if (typeof module !== 'undefined' && module.exports) {
      module.exports = factory();
    } else {
      exports[name] = factory();
    }
  } else if (typeof define === 'function' && define.amd) {
    define(factory);
  } else {
    context[name] = factory();
  }

}('chillout', this, function() {
  'use strict';

  var chillout = {};

  // nextTick implementation
  if (typeof setImmediate === 'function') {
    chillout.nextTick = function(task) {
      setImmediate(task);
    };
  } else if (typeof process === 'object' && typeof process.nextTick === 'function') {
    chillout.nextTick = function(task) {
      process.nextTick(task);
    };
  } else if (typeof MessageChannel === 'function') {
    chillout.nextTick = (function() {
      // http://www.nonblocking.io/2011/06/windownexttick.html
      var channel = new MessageChannel();
      var head = {}, tail = head;

      channel.port1.onmessage = function() {
        head = head.next;
        var task = head.task;
        delete head.task;
        task();
      };

      return function(task) {
        tail = tail.next = {task: task};
        channel.port2.postMessage(0);
      };
    }());
  } else {
    chillout.nextTick = function(task) {
      setTimeout(task, 0);
{'fraction_non_alphanumeric': 0.15290245362058646, 'fraction_numerical': 0.01286654697785757, 'mean_word_length': 2.756179775280899, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3979139', 'n_tokens_mistral': 1033, 'n_tokens_neox': 1002, 'n_words': 243}