code: function sharedStart (array) {
    var sorted = array.concat().sort()
    var first = sorted[0]
    var last = sorted[sorted.length - 1]
    var len = first.length
    var i = 0
    while (i < len && first.charAt(i) === last.charAt(i)) i++
    return first.substring(0, i)
  }
docs: http://stackoverflow.com/questions/1916218/find-the-longest-common-starting-substring-in-a-set-of-strings/1917041#1917041