<commit_before>import value from './methods/other/value';
import use from './methods/other/use';

class AsyncAfWrapperProto {}

class AsyncAfWrapper extends AsyncAfWrapperProto {
  constructor(promises) {
    super();
    this.innerVal = promises;
  }
}

const AsyncAfCreator = AsyncAfWrapper;
// eslint-disable-next-line no-class-assign, no-shadow
AsyncAfWrapper = function AsyncAfWrapper(...args) {<commit_msg>(refactor/feat) move logic to AsyncAfWrapperProto (DRY); create new instance in each call to AsyncAF.then in order to simplify chaining syntax<commit_after>import value from './methods/other/value';
import use from './methods/other/use';

class AsyncAfWrapperProto {
  constructor(data) {
    this.data = Promise[Array.isArray(data) ? 'all' : 'resolve'](data);
  }
  then(resolve, reject) {
    return new (this.constructor)(this.data.then(resolve, reject));
  }
  catch(reject) {
    return this.then(null, reject);
  }
}

class AsyncAfWrapper extends AsyncAfWrapperProto {}

const AsyncAfCreator = AsyncAfWrapper;
// eslint-disable-next-line no-class-assign
AsyncAfWrapper = function AsyncAfWrapper(...args) {
{'fraction_non_alphanumeric': 0.12288512911843277, 'fraction_numerical': 0.0, 'mean_word_length': 4.73469387755102, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '2058879', 'n_tokens_mistral': 334, 'n_tokens_neox': 333, 'n_words': 83}