(path)
| 359 | } |
| 360 | |
| 361 | toUrl(path) { |
| 362 | let cached = this.memoizedURLs.get(path) |
| 363 | if (cached) return cached |
| 364 | |
| 365 | if (sep === '\\') { |
| 366 | path = path.replace(/\\/g, '/') |
| 367 | } |
| 368 | |
| 369 | let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent) |
| 370 | this.memoizedURLs.set(path, url) |
| 371 | |
| 372 | return url |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | module.exports = MapGenerator |
no test coverage detected