<commit_before>var constants = require('../constants/constants');

var Room = function(roomId) {
  this.id = constants.ROOMS[roomId].id;
  this.name = constants.ROOMS[roomId].name;

  this._links = {
    self: {
      href: '/rooms/' + constants.ROOMS[roomId].id
    }
  }
}

var roomModel = {};

roomModel.getSingleRoom = function(roomId) {
  return new Room(roomId);
}

roomModel.getAllRooms = function() {
  rooms = [];
  for (var room in constants.ROOMS) {
    rooms.push(new Room(room));
  }
  return rooms;
}

module.exports = roomModel;<commit_msg>Created a Rooms model object<commit_after>var constants = require('../constants/constants');

var Room = function(roomId) {
  this.id = constants.ROOMS[roomId].id;
  this.name = constants.ROOMS[roomId].name;

  this._links = {
    self: {
      href: '/rooms/' + constants.ROOMS[roomId].id
    }
  }
}

var Rooms = function() {
  this.rooms = [];
  this._links = {
    self: {
      href: '/rooms'
    }
  };

  for (var room in constants.ROOMS) {
    this.rooms.push(new Room(room));
  }
}

var roomModel = {};

roomModel.getSingleRoom = function(roomId) {
  return new Room(roomId);
}

roomModel.getAllRooms = function() {
  return new Rooms();
}

module.exports = roomModel;
{'fraction_non_alphanumeric': 0.15827922077922077, 'fraction_numerical': 0.0, 'mean_word_length': 3.2664359861591694, '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': '2918158', 'n_tokens_mistral': 443, 'n_tokens_neox': 442, 'n_words': 83}