code: function(input) {
    input = input.toString();
    var hash = 0, i, chr, len = input.length;
    if (len === 0) {
      return hash;
    }
    for (i = 0; i < len; i++) {
      chr = input.charCodeAt(i);
      hash = (hash << 5) - hash + chr;
      hash |= 0;
    }
    return hash;
  }
docs: Receives an input and calculates a hash for it