<commit_before>Items = new Meteor.Collection('items');

Router.map(function () {
  this.route('home', {
    path: '/'
  });

  this.route('items', {
    controller: 'ItemsController',
    action: 'customAction'
  });
});

if (Meteor.isServer) {
  var seed = function () {
    Items.remove({});
    for (var i = 0; i < 100; i++) {
      Items.insert({body: 'Item ' + i});
    }
  };

  Meteor.startup(seed);

  var Future = Npm.require('fibers/future');

  Meteor.publish('items', function () {
    var future = new Future;

    // simulate high latency publish function
    Meteor.setTimeout(function () {
      future.return(Items.find());
    }, 2000);

    console.log('wtf');
    return future.wait();<commit_msg>Special debug messages not required in example.<commit_after>Items = new Meteor.Collection('items');

Router.map(function () {
  this.route('home', {
    path: '/'
  });

  this.route('items', {
    controller: 'ItemsController',
    action: 'customAction'
  });
});

if (Meteor.isServer) {
  var seed = function () {
    Items.remove({});
    for (var i = 0; i < 100; i++) {
      Items.insert({body: 'Item ' + i});
    }
  };

  Meteor.startup(seed);

  var Future = Npm.require('fibers/future');

  Meteor.publish('items', function () {
    var future = new Future;

    // simulate high latency publish function
    Meteor.setTimeout(function () {
      future.return(Items.find());
    }, 2000);

    return future.wait();
{'fraction_non_alphanumeric': 0.18074792243767313, 'fraction_numerical': 0.0110803324099723, 'mean_word_length': 2.9917127071823204, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5594696', 'n_tokens_mistral': 510, 'n_tokens_neox': 461, 'n_words': 100}