<commit_before># # promise

do (OJ = (if typeof global isnt 'undefined' and global then global else (if typeof window isnt 'undefined' then window else this)).OJ) ->

  # ## ajaxPromise
  # [OJ](oj.html).async.ajaxPromise converts an AJAX XmlHttpRequest into a Promise. 
  # See also [Promise.resolve](https://github.com/petkaantonov/bluebird/blob/master/API.md).
  OJ.async.register 'ajaxPromise', (ajax) -> 
    promise = Promise.resolve ajax
    promise.abort -> 
      ajax.abort()
      promise.done()
    promise.readyState = ajax.readyState
    promise

  # ## all
  # [OJ](oj.html).async.all takes an array of functions and returns a promise representing the success of all methods or the failure of any method.
  # See also [Promise.all](https://github.com/petkaantonov/bluebird/blob/master/API.md).
  OJ.async.register 'all', (initArray) ->
    reqs = initArray or []
    promise = Promise.all(reqs)<commit_msg>Revert ajax abort change in issue #28.<commit_after># # promise

do (OJ = (if typeof global isnt 'undefined' and global then global else (if typeof window isnt 'undefined' then window else this)).OJ) ->

  # ## ajaxPromise
  # [OJ](oj.html).async.ajaxPromise converts an AJAX XmlHttpRequest into a Promise. 
  # See also [Promise.resolve](https://github.com/petkaantonov/bluebird/blob/master/API.md).
  OJ.async.register 'ajaxPromise', (ajax) -> 
    promise = Promise.resolve ajax
    promise.abort = ajax.abort
    promise.readyState = ajax.readyState
    promise

  # ## all
  # [OJ](oj.html).async.all takes an array of functions and returns a promise representing the success of all methods or the failure of any method.
  # See also [Promise.all](https://github.com/petkaantonov/bluebird/blob/master/API.md).
  OJ.async.register 'all', (initArray) ->
    reqs = initArray or []
    promise = Promise.all(reqs)
{'fraction_non_alphanumeric': 0.12418300653594772, 'fraction_numerical': 0.0010893246187363835, 'mean_word_length': 3.6155778894472363, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '2863519', 'n_tokens_mistral': 584, 'n_tokens_neox': 572, 'n_words': 166}