<commit_before>module.exports = drainpipe
drainpipe.unwrap = unwrap


function drainpipe(x) {
  var curr = unwrap(x)
  self._drainpipe_chain = true

  function self(fn) {
    if (!arguments.length) return curr

    var args = Array.prototype.slice.call(arguments, 1)
    args.unshift(curr)
    curr = unwrap(fn.apply(fn, args))

    return self
  }

  return self
}


function unwrap(x) {
  return (x || 0)._drainpipe_chain
    ? x()
    : x
}<commit_msg>support umd<commit_after>;(function() {
  drainpipe.unwrap = unwrap


  function drainpipe(x) {
    var curr = unwrap(x)
    self._drainpipe_chain = true

    function self(fn) {
      if (!arguments.length) return curr

      var args = Array.prototype.slice.call(arguments, 1)
      args.unshift(curr)
      curr = unwrap(fn.apply(fn, args))

      return self
    }

    return self
  }


  function unwrap(x) {
    return (x || 0)._drainpipe_chain
      ? x()
      : x
  }


  if (typeof module != 'undefined') {
    module.exports = drainpipe
  }
  else if (typeof define == 'function' && define.amd) {
    define(function() {
      return drainpipe
    })
  }
  else {
    this.drainpipe = drainpipe
  }
}).call(this);
{'fraction_non_alphanumeric': 0.12542372881355932, 'fraction_numerical': 0.003389830508474576, 'mean_word_length': 2.6450617283950617, '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': '6832833', 'n_tokens_mistral': 421, 'n_tokens_neox': 406, 'n_words': 91}