(string, options = {})
| 276 | }; |
| 277 | class MagicString { |
| 278 | constructor(string, options = {}) { |
| 279 | const chunk = new Chunk(0, string.length, string); |
| 280 | Object.defineProperties(this, { |
| 281 | original: { writable: true, value: string }, |
| 282 | outro: { writable: true, value: '' }, |
| 283 | intro: { writable: true, value: '' }, |
| 284 | firstChunk: { writable: true, value: chunk }, |
| 285 | lastChunk: { writable: true, value: chunk }, |
| 286 | lastSearchedChunk: { writable: true, value: chunk }, |
| 287 | byStart: { writable: true, value: {} }, |
| 288 | byEnd: { writable: true, value: {} }, |
| 289 | filename: { writable: true, value: options.filename }, |
| 290 | indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, |
| 291 | sourcemapLocations: { writable: true, value: new BitSet() }, |
| 292 | storedNames: { writable: true, value: {} }, |
| 293 | indentStr: { writable: true, value: guessIndent(string) }, |
| 294 | }); |
| 295 | this.byStart[0] = chunk; |
| 296 | this.byEnd[string.length] = chunk; |
| 297 | } |
| 298 | addSourcemapLocation(char) { |
| 299 | this.sourcemapLocations.add(char); |
| 300 | } |
nothing calls this directly
no test coverage detected