(pathname)
| 155 | _exceptSlash () { return /(\/|%(?:25)*(?:2f))/gi } |
| 156 | |
| 157 | _encodePath (pathname) { |
| 158 | return pathname.split(this._exceptSlash()) |
| 159 | .map((el, i) => i % 2 === 0 ? encodeURIComponent(el) : el) |
| 160 | .join('') |
| 161 | /* pathArray.forEach((el, i) => { |
| 162 | if (i % 2 === 0) pathArray[i] = encodeURIComponent(el) |
| 163 | }) */ |
| 164 | // return pathArray.join('') |
| 165 | } |
| 166 | |
| 167 | _decodePath (pathname) { |
| 168 | return pathname.split(this._exceptSlash()) |
no test coverage detected