* Encode path using encodeUriSegment, ignoring forward slashes * * @param {string} path Path to encode * @returns {string}
(path)
| 5042 | * @returns {string} |
| 5043 | */ |
| 5044 | function encodePath(path) { |
| 5045 | var segments = path.split('/'), |
| 5046 | i = segments.length; |
| 5047 | |
| 5048 | while (i--) { |
| 5049 | segments[i] = encodeUriSegment(segments[i]); |
| 5050 | } |
| 5051 | |
| 5052 | return segments.join('/'); |
| 5053 | } |
| 5054 | |
| 5055 | function stripHash(url) { |
| 5056 | return url.split('#')[0]; |
no test coverage detected