tibialand/tibia-node-crawler

View on GitHub
src/modules/highscores/object.js

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * Highscores Object
 */

function Highscores(){
  this.highscores = [];
}

/**
 * .getByRank()
 */

Highscores.prototype.getByRank = function(number){
  return _.find(this.highscores, {'rank': number});
};

/**
 * .getByName()
 */

Highscores.prototype.getByName = function(name){
  return _.find(this.highscores, {'name': name});
};

module.exports = Highscores;