unist-util-position
Advanced tools
Comparing version 4.0.2 to 4.0.3
/** | ||
* Get the positional info of `node`. | ||
* | ||
* @param {NodeLike} [node] | ||
* @param {NodeLike|Node} [node] | ||
* @returns {Position} | ||
*/ | ||
export function position(node?: NodeLike): Position | ||
export function position(node?: NodeLike | Node): Position | ||
/** | ||
* Get the positional info of `node`. | ||
* | ||
* @param {NodeLike} [node] | ||
* @param {NodeLike|Node} [node] | ||
* @returns {Point} | ||
*/ | ||
export function pointStart(node?: NodeLike): Point | ||
export function pointStart(node?: NodeLike | Node): Point | ||
/** | ||
* Get the positional info of `node`. | ||
* | ||
* @param {NodeLike} [node] | ||
* @param {NodeLike|Node} [node] | ||
* @returns {Point} | ||
*/ | ||
export function pointEnd(node?: NodeLike): Point | ||
export function pointEnd(node?: NodeLike | Node): Point | ||
export type Position = import('unist').Position | ||
@@ -23,0 +23,0 @@ export type Node = import('unist').Node |
@@ -20,3 +20,3 @@ /** | ||
* | ||
* @param {NodeLike} [node] | ||
* @param {NodeLike|Node} [node] | ||
* @returns {Position} | ||
@@ -39,8 +39,6 @@ */ | ||
* | ||
* @param {NodeLike} [node] | ||
* @param {NodeLike|Node} [node] | ||
* @returns {Point} | ||
*/ | ||
function point(node) { | ||
/** @type {Point} */ | ||
// @ts-expect-error looks like a point | ||
const point = (node && node.position && node.position[type]) || {} | ||
@@ -47,0 +45,0 @@ |
{ | ||
"name": "unist-util-position", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "unist utility to get the position of a node", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8461
78