Socket
Socket
Sign inDemoInstall

unist-util-visit-parents

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unist-util-visit-parents - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

20

lib/index.d.ts
export function visitParents<
Tree extends import('unist').Node,
Check extends import('../node_modules/unist-util-is/lib/index.js').Test
Check extends Test
>(

@@ -12,9 +12,6 @@ tree: Tree,

Tree extends import('unist').Node,
Check extends import('../node_modules/unist-util-is/lib/index.js').Test
Check extends Test
>(
tree: Tree,
visitor: BuildVisitor<
Tree,
import('../node_modules/unist-util-is/lib/index.js').Test
>,
visitor: BuildVisitor<Tree, Test>,
reverse?: boolean | null | undefined

@@ -36,4 +33,11 @@ ): undefined

export type UnistParent = import('unist').Parent
export type Test = import('unist-util-is').Test
/**
* Test from `unist-util-is`.
*
* Note: we have remove and add `undefined`, because otherwise when generating
* automatic `.d.ts` files, TS tries to flatten paths from a local perspective,
* which doesn’t work when publishing on npm.
*/
export type Test = Exclude<import('unist-util-is').Test, undefined> | undefined
/**
* Get the value of a type guard `Fn`.

@@ -224,3 +228,3 @@ */

Tree extends import('unist').Node = import('unist').Node,
Check extends import('../node_modules/unist-util-is/lib/index.js').Test = import('../node_modules/unist-util-is/lib/index.js').Test
Check extends Test = Test
> = Visitor<

@@ -227,0 +231,0 @@ Matches<InclusiveDescendant<Tree>, Check>,

10

lib/index.js
/**
* @typedef {import('unist').Node} UnistNode
* @typedef {import('unist').Parent} UnistParent
* @typedef {import('unist-util-is').Test} Test
*/
/**
* @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test
* Test from `unist-util-is`.
*
* Note: we have remove and add `undefined`, because otherwise when generating
* automatic `.d.ts` files, TS tries to flatten paths from a local perspective,
* which doesn’t work when publishing on npm.
*/
/**
* @typedef {(

@@ -9,0 +17,0 @@ * Fn extends (value: any) => value is infer Thing

{
"name": "unist-util-visit-parents",
"version": "6.0.0",
"version": "6.0.1",
"description": "unist utility to recursively walk over nodes, with ancestral information",

@@ -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