Socket
Socket
Sign inDemoInstall

unist-util-position

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unist-util-position - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

12

index.d.ts
/**
* 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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc