getLevel(entropy = this.entropy) {
    const lowestLevel = this.levels[0];
    let prevMaxEntropy = lowestLevel.maxEntropy;

    if (entropy <= lowestLevel.maxEntropy) {
      return lowestLevel;
    }

    if (entropy >= this.maxEntropy) {
      return this.levels[this.levels.length - 1];
    }

    // Iterate through levels and find the one which the passed entropy belongs to
    for (let i = 1; i < this.levels.length; i++) {
      const level = this.levels[i];

      if (entropy > prevMaxEntropy && entropy <= level.maxEntropy) {
        return level;
      }

      prevMaxEntropy = level.maxEntropy;
    }

    return lowestLevel;
  }
Finds the level which one the passed entropy suits
@param {number} entropy - Points of password's security
@returns {object} - Returns the level object