mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
* Remove pinning of eslint-plugin-markdown An issue affecting Node.js source has been fixed in eslint-plugin-markdown so we don't need to pin it to beta-4 anymore. Refs: https://github.com/eslint/eslint-plugin-markdown/issues/69 * Update eslint-plugin-markdown up to 1.0.0-beta.7 * Fix docs for eslint-plugin-markdown@1.0.0-beta.7 PR-URL: https://github.com/nodejs/node/pull/14047 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
unist-util-stringify-position

Stringify a Unist position or location.
Installation
npm:
npm install unist-util-stringify-position
Usage
var stringify = require('unist-util-stringify-position');
stringify({line: 2, column: 3 }); //=> '2:3'
stringify({
start: {line: 2},
end: {line: 3}
}); //=> '2:1-3:1'
stringify({
type: 'text',
value: '!',
position: {
start: {line: 5, column: 11},
end: {line: 5, column: 12}
}
}); //=> '5:11-5:12'
API
stringifyPosition(node|location|position)
Stringify one position, a location (start and end positions), or a node’s location.
Parameters
node(Node) — Node whose'position'property to stringifylocation(Location) — Location whose'start'and'end'positions to stringifyposition(Position) — Location whose'line'and'column'to stringify
Returns
string? — A range ls:cs-le:ce (when given node or
location) or a point l:c (when given position), where l stands
for line, c for column, s for start, and e for
end. null is returned if the given value is neither node,
location, nor position.