(source: string, filename: string = '')
| 21 | |
| 22 | |
| 23 | function lineToLineSourceMap(source: string, filename: string = ''): MappingsMap { |
| 24 | // The first line mapping in our package is the base64vlq code for zeros (A). |
| 25 | const firstLine = 'AAAA;'; |
| 26 | |
| 27 | // Most other lines in our mappings are all zeros (for module, column etc) |
| 28 | // except for the lineno mapping: curLineno - prevLineno = 1; Which is C. |
| 29 | const line = 'AACA;'; |
| 30 | |
| 31 | return { |
| 32 | file: filename, |
| 33 | mappings: firstLine + Array(countLines(source)).join(line), |
| 34 | sources: [filename], |
| 35 | names: [], |
| 36 | version: 3, |
| 37 | }; |
| 38 | } |
| 39 | |
| 40 | const wrapperEnd = wrappedCode => wrappedCode.indexOf('{') + 1; |
| 41 |
no test coverage detected
searching dependent graphs…