code: function collect_js_deps(b, opts) {
    const collector = new Collector(opts);
  
    b.pipeline.get('deps').push(through.obj((row, enc, next) => {
      let p = row.file || row.id;
      collector.processFile(p, row.source).then(() => { next(); });
    }));
    return b;
  }
docs: Collect all JS files as gathered by the passed-in browserify instance. For this usage,
  .browserField should normally be false (which is set automatically for command-line usage by
  including --node into the command line).
  @param b - Browserify instance.
  @param opts.outdir - Optional directory to which to place copy of files (possibly transformed).
  In case of transforms of non-js files (e.g. compiling .ts files with tsify), the output file
  will be saved with .js extension.
  @param opts.list - Optional boolean for whether to print all source files encountered.