<commit_before>Building upon the previous "using transforms" second, write a custom
browserify transform so that in main.js you can simply do:

  var txt = require('$WAKE_FILE');
  console.log(txt);

and the `txt` output will be formatted with the proper line-numbering as
from the previous level: printf("%3d %s", lineNum, line) every 5th line
line numbers starting from zero and four leading spaces on the other
lines.

You will need to factor out your formatting code to be a node transform
stream, which you can learn more about in the stream-adventure nodeschool
workshop. The basic signature of a browserify transform is:

  var through = require('through2');
  
  module.exports = function (file) {
    if (!/\.txt$/.test(file)) return through();
    // ...
    return stream;
  };<commit_msg>typos<commit_after>Building upon the previous "using transforms" section, write a custom
browserify transform so that in main.js you can simply do:

  var txt = require('$WAKE_FILE');
  console.log(txt);

and the `txt` output will be formatted with the proper line-numbering as
from the previous level: printf("%3d %s", lineNum, line) every 5th line,
line numbers starting from zero and four leading spaces on the other
lines.

You will need to factor out your formatting code to be a node transform
stream, which you can learn more about in the stream-adventure nodeschool
workshop. The basic signature of a browserify transform is:

  var through = require('through2');
  
  module.exports = function (file) {
    if (!/\.txt$/.test(file)) return through();
    // ...
    return stream;
  };
{'fraction_non_alphanumeric': 0.08720200752823086, 'fraction_numerical': 0.0037641154328732747, 'mean_word_length': 4.031545741324921, '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': '2543416', 'n_tokens_mistral': 445, 'n_tokens_neox': 428, 'n_words': 212}