* Read source map from file. * @param {URL} mapURL - file url of the source map * @returns {object} deserialized source map JSON object
(mapURL)
| 283 | * @returns {object} deserialized source map JSON object |
| 284 | */ |
| 285 | function sourceMapFromFile(mapURL) { |
| 286 | try { |
| 287 | const content = readFileSync(fileURLToPath(mapURL), 'utf8'); |
| 288 | const data = JSONParse(content); |
| 289 | return sourcesToAbsolute(mapURL, data); |
| 290 | } catch (err) { |
| 291 | debug(err); |
| 292 | return null; |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | // data:[<mediatype>][;base64],<data> see: |
| 297 | // https://tools.ietf.org/html/rfc2397#section-2 |
no test coverage detected
searching dependent graphs…