diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-05-14 14:05:49 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-05-14 14:05:49 +0800 |
| commit | 06823fbf1c2e763a5bf76c3990ca98fbbcd98691 (patch) | |
| tree | 4280bece3888d12a022093bf1a9cd1b049393602 /node_modules/source-map-js/README.md | |
| parent | 1368909b3cd552dbb0d12d5863c597f5be46177d (diff) | |
updated node_modules
Diffstat (limited to 'node_modules/source-map-js/README.md')
| -rw-r--r-- | node_modules/source-map-js/README.md | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/node_modules/source-map-js/README.md b/node_modules/source-map-js/README.md index ba01846c..614962d7 100644 --- a/node_modules/source-map-js/README.md +++ b/node_modules/source-map-js/README.md @@ -466,6 +466,9 @@ You may pass an object with the following properties: discretion, as a last resort. Even then, one should avoid using this flag when running tests, if possible. +* `ignoreInvalidMapping`: Optional. When `true`, instead of throwing error on + invalid mapping, it will be ignored. + ```js var generator = new sourceMap.SourceMapGenerator({ file: "my-generated-javascript-file.js", @@ -473,14 +476,18 @@ var generator = new sourceMap.SourceMapGenerator({ }); ``` -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer, sourceMapGeneratorOptions) Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. * `sourceMapConsumer` The SourceMap. +* `sourceMapGeneratorOptions` options that will be passed to the SourceMapGenerator constructor which used under the hood. + ```js -var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer, { + ignoreInvalidMapping: true, +}); ``` #### SourceMapGenerator.prototype.addMapping(mapping) |
