mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-30 17:27:22 +08:00
This also adds Python-2.0 to the list of accepted licenses. Lastly, it fixes a bug where the package.json files were incorrectly reordered. For the `exports` of a particular package, the order that the entrypoints are defined in is crucial. Therefore, we should not alter the order of entrypoints and instead maintain the originally defined ordering. We can use an `OrderedDict` to ensure that Python always loads the JSON files in the same order. DISABLE_THIRD_PARTY_CHECK=NPM update R=jacktfranklin@chromium.org Bug: none Change-Id: I5a309782de6015edea6ba3b502aa0db1f008d973 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692909 Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
unist-util-stringify-position
unist utility to pretty print the positional information of a node.
Install
npm:
npm install unist-util-stringify-position
Use
var stringify = require('unist-util-stringify-position')
// Point
stringify({line: 2, column: 3}) // => '2:3'
// Position
stringify({start: {line: 2}, end: {line: 3}}) // => '2:1-3:1'
// Node
stringify({
type: 'text',
value: '!',
position: {
start: {line: 5, column: 11},
end: {line: 5, column: 12}
}
}) // => '5:11-5:12'
API
stringifyPosition(node|position|point)
Stringify one point, a position (start and end points), or a node’s positional information.
Parameters
node(Node) — Node whose'position'property to stringifyposition(Position) — Position whose'start'and'end'points to stringifypoint(Point) — Point whose'line'and'column'to stringify
Returns
string? — A range ls:cs-le:ce (when given node or position) or a point
l:c (when given point), where l stands for line, c for column, s for
start, and e for end.
An empty string ('') is returned if the given value is neither node,
position, nor point.
Related
unist-util-generated— Check if a node is generatedunist-util-position— Get positional info of nodesunist-util-remove-position— Remove positional info from treesunist-util-source— Get the source of a value (node or position) in a file
Contribute
See contributing.md in syntax-tree/.github for ways to get
started.
See support.md for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.