<commit_before>#!/usr/bin/env node

var split = require('split'),
  fs = require('fs'),
  argv = require('optimist')
    .describe('m', 'Function body expression to run.')
    .alias('m', 'map')
    .demand('m')
    .argv;

var map = new Function("x", "return " + argv.m);

process.stdin.setEncoding('utf8');
process.stdin.pipe(split()).on('data', function(line) {
  if (line) console.log(map(line));
});
process.on('end', function() {
  process.exit();
});

process.stdin.resume();<commit_msg>moving resume for node 10 compat<commit_after>#!/usr/bin/env node

var split = require('split'),
  fs = require('fs'),
  argv = require('optimist')
    .describe('m', 'Function body expression to run.')
    .alias('m', 'map')
    .demand('m')
    .argv;

var map = new Function("x", "return " + argv.m);

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.pipe(split()).on('data', function(line) {
  if (line) console.log(map(line));
});
process.on('end', function() {
  process.exit();
});

{'fraction_non_alphanumeric': 0.2224428997020854, 'fraction_numerical': 0.003972194637537239, 'mean_word_length': 4.361702127659575, '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': '1098812', 'n_tokens_mistral': 359, 'n_tokens_neox': 351, 'n_words': 74}