<commit_before>{Duplex} = require 'stream'

# TODO: error handling. exit code? stderr?
class Process extends Duplex
  constructor: (@stream_opts, @process) ->
    super objectMode: false
    @on 'pipe', (source) => source.unpipe(@).pipe @process.stdin
  pipe: (dest, options) => @process.stdout.pipe dest, options

module.exports = (Understream) ->
  Understream.mixin Process, 'process'
module.exports.Process = Process
<commit_msg>process: always use objectMode: false<commit_after>_ = require 'underscore'
{Duplex} = require 'stream'

# TODO: error handling. exit code? stderr?
class Process extends Duplex
  constructor: (@stream_opts, @process) ->
    super _(@stream_opts).extend(objectMode: false)
    @on 'pipe', (source) => source.unpipe(@).pipe @process.stdin
  pipe: (dest, options) => @process.stdout.pipe dest, options

module.exports = (Understream) ->
  Understream.mixin Process, 'process'
module.exports.Process = Process

{'fraction_non_alphanumeric': 0.1395101171458999, 'fraction_numerical': 0.0, 'mean_word_length': 5.0256410256410255, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6788996', 'n_tokens_mistral': 291, 'n_tokens_neox': 287, 'n_words': 81}