code: function collapseLeadingSlashes (str) {
    for (var i = 0; i < str.length; i++) {
      if (str.charCodeAt(i) !== 0x2f /* / */) {
        break
      }
    }
  
    return i > 1
      ? '/' + str.substr(i)
      : str
  }
docs: Collapse all leading slashes into a single slash
  @private