<commit_before>//to include in html add {{> daycareinfo}}
Template.daycareinfo.helpers({

  isReady: function(sub) {
    if(sub) {
      return FlowRouter.subsReady(sub);
    } else {
      return FlowRouter.subsReady();
    }
  },
  getDaycare: function() {
    var dc = daycares.find().fetch();
    return dc;
  },
  getReviews: function() {
    var rev =  reviews.find({},{sort:{createdAt:-1}}).fetch();
    return rev; 
  },
  toTitleCase: function(str) {
    return str.replace(/\w\S*/g, function(txt) {
      return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
    })
  },
  convertBoolean: function(str) {
    if(str === 'N') {
      return "No";
    } else {
      return "Yes";
    }
  }

});


// example daycare
// {
//   "iD": "97147",
//   "name":"<NAME>",
//   "address":"3975 NW COUNTY ROAD 0010, CORSICANA",<commit_msg>added N/A to boolean conversion<commit_after>//to include in html add {{> daycareinfo}}
Template.daycareinfo.helpers({

  isReady: function(sub) {
    if(sub) {
      return FlowRouter.subsReady(sub);
    } else {
      return FlowRouter.subsReady();
    }
  },
  getDaycare: function() {
    var dc = daycares.find().fetch();
    return dc;
  },
  getReviews: function() {
    var rev =  reviews.find({},{sort:{createdAt:-1}}).fetch();
    return rev; 
  },
  toTitleCase: function(str) {
    return str.replace(/\w\S*/g, function(txt) {
      return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
    })
  },
  convertBoolean: function(str) {
    if(str === "N") {
      return "No";
    } else if(str === "Y") {
      return "Yes";
    } else {
      return "N/A"
    }
  }

});


// example daycare
// {
//   "iD": "97147",
//   "name":"<NAME>",
//   "address":"3975 NW COUNTY ROAD 0010, CORSICANA",
{'fraction_non_alphanumeric': 0.1933106575963719, 'fraction_numerical': 0.018140589569160998, 'mean_word_length': 2.6694386694386694, 'pattern_counts': {'":': 6, '<': 5, '<?xml version=': 0, '>': 7, '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': '2862663', 'n_tokens_mistral': 659, 'n_tokens_neox': 636, 'n_words': 122}