<commit_before>
export function mixin(Cls, protoMixin, staticMixin) {
  if (arguments.length == 2) {
    let keys = Object.keys(protoMixin)
    switch (keys.length) {
      case 1:
        if (keys[0] == '$proto') {
          protoMixin = protoMixin.$proto
        } else if (keys[0] == '$static') {
          staticMixin = protoMixin.$static
          protoMixin = undefined
        }
      break
      case 2:
        if (keys.indexOf('$proto') >= 0 && keys.indexOf('$static') >= 0) {
          staticMixin = protoMixin.$static
          protoMixin = protoMixin.$proto
        }
      break
    }
  }
  if (protoMixin) {
    if (Cls.prototype) {
      _mixin(Cls.prototype, protoMixin)
    } else {
      throw new Error('attempt to mixin prototype members into a non-Function: ' + Cls)
    }
  }
  if (staticMixin) {
    _mixin(Cls, staticMixin)
  }
  return Cls
}


function _mixin(dst, src) {
  let srcPropNames = Object.getOwnPropertyNames(src)
  let dstPropNames = Object.getOwnPropertyNames(dst)
  let descriptors = {}
  for (let i = 0; i < srcPropNames.length; ++i) {
    let propName = srcPropNames[i]
    if (dstPropNames.indexOf(propName) == -1) {
      let desc = Object.getOwnPropertyDescriptor(src, propName)
      desc.enumerable = false
      desc.configurable = true
      if ('value' in desc) {
        desc.writable = true
      }
      descriptors[propName] = desc
    }
  }
  Object.defineProperties(dst, descriptors)
  return dst
}


export function repeat(x, n) {
  return new Array(n).fill(x)
}


export function isThenable(obj) {
  return obj && 'function' === typeof obj.then
}


export function isIterator(obj) {
  return obj && 'function' === typeof obj.next
}


export function isGenerator(obj) {<commit_msg>Remove dependency on `Array::fill()` function from ES2015<commit_after>
export function mixin(Cls, protoMixin, staticMixin) {
  if (arguments.length == 2) {
    let keys = Object.keys(protoMixin)
    switch (keys.length) {
      case 1:
        if (keys[0] == '$proto') {
          protoMixin = protoMixin.$proto
        } else if (keys[0] == '$static') {
          staticMixin = protoMixin.$static
          protoMixin = undefined
        }
      break
      case 2:
        if (keys.indexOf('$proto') >= 0 && keys.indexOf('$static') >= 0) {
          staticMixin = protoMixin.$static
          protoMixin = protoMixin.$proto
        }
      break
    }
  }
  if (protoMixin) {
    if (Cls.prototype) {
      _mixin(Cls.prototype, protoMixin)
    } else {
      throw new Error('attempt to mixin prototype members into a non-Function: ' + Cls)
    }
  }
  if (staticMixin) {
    _mixin(Cls, staticMixin)
  }
  return Cls
}


function _mixin(dst, src) {
  let srcPropNames = Object.getOwnPropertyNames(src)
  let dstPropNames = Object.getOwnPropertyNames(dst)
  let descriptors = {}
  for (let i = 0; i < srcPropNames.length; ++i) {
    let propName = srcPropNames[i]
    if (dstPropNames.indexOf(propName) == -1) {
      let desc = Object.getOwnPropertyDescriptor(src, propName)
      desc.enumerable = false
      desc.configurable = true
      if ('value' in desc) {
        desc.writable = true
      }
      descriptors[propName] = desc
    }
  }
  Object.defineProperties(dst, descriptors)
  return dst
}


export function repeat(x, n) {
  let arr = new Array(n)
  for (let i = 0; i < n; ++i) {
    arr[i] = x
  }
  return arr
}


export function isThenable(obj) {
  return obj && 'function' === typeof obj.then
}


export function isIterator(obj) {
  return obj && 'function' === typeof obj.next
}


export function isGenerator(obj) {
{'fraction_non_alphanumeric': 0.1243364068175468, 'fraction_numerical': 0.006426376082704666, 'mean_word_length': 2.601609657947686, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 7, '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': '1943329', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1173, 'n_words': 290}