diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/source-map/README.md | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) |
update packages
Diffstat (limited to 'node_modules/source-map/README.md')
-rw-r--r-- | node_modules/source-map/README.md | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/node_modules/source-map/README.md b/node_modules/source-map/README.md index 32813394a..fea4beb19 100644 --- a/node_modules/source-map/README.md +++ b/node_modules/source-map/README.md @@ -248,9 +248,13 @@ Returns the original source, line, and column information for the generated source's line and column positions provided. The only argument is an object with the following properties: -* `line`: The line number in the generated source. +* `line`: The line number in the generated source. Line numbers in + this library are 1-based (note that the underlying source map + specification uses 0-based line numbers -- this library handles the + translation). -* `column`: The column number in the generated source. +* `column`: The column number in the generated source. Column numbers + in this library are 0-based. * `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest @@ -264,10 +268,10 @@ and an object is returned with the following properties: available. * `line`: The line number in the original source, or null if this information is - not available. + not available. The line number is 1-based. * `column`: The column number in the original source, or null if this - information is not available. + information is not available. The column number is 0-based. * `name`: The original identifier, or null if this information is not available. @@ -293,15 +297,19 @@ the following properties: * `source`: The filename of the original source. -* `line`: The line number in the original source. +* `line`: The line number in the original source. The line number is + 1-based. -* `column`: The column number in the original source. +* `column`: The column number in the original source. The column + number is 0-based. and an object is returned with the following properties: -* `line`: The line number in the generated source, or null. +* `line`: The line number in the generated source, or null. The line + number is 1-based. -* `column`: The column number in the generated source, or null. +* `column`: The column number in the generated source, or null. The + column number is 0-based. ```js consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) @@ -322,15 +330,19 @@ The only argument is an object with the following properties: * `source`: The filename of the original source. -* `line`: The line number in the original source. +* `line`: The line number in the original source. The line number is + 1-based. -* `column`: Optional. The column number in the original source. +* `column`: Optional. The column number in the original source. The + column number is 0-based. and an array of objects is returned, each with the following properties: -* `line`: The line number in the generated source, or null. +* `line`: The line number in the generated source, or null. The line + number is 1-based. -* `column`: The column number in the generated source, or null. +* `column`: The column number in the generated source, or null. The + column number is 0-based. ```js consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) @@ -534,10 +546,11 @@ use before outputting the generated JS and source map. #### new SourceNode([line, column, source[, chunk[, name]]]) * `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. + it isn't associated with an original line. The line number is 1-based. * `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. + if it isn't associated with an original column. The column number + is 0-based. * `source`: The original source's filename; null if no filename is provided. |