Socket
Socket
Sign inDemoInstall

unist-util-modify-children

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-modify-children - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

14

package.json
{
"name": "unist-util-modify-children",
"version": "1.1.5",
"description": "Unist utility to modify direct children of a parent",
"version": "1.1.6",
"description": "utility to modify direct children of a parent",
"license": "MIT",
"keywords": [
"unist",
"retext",
"nlcst",
"mdast",
"unist-util",
"util",
"utility",
"tree",
"ast",
"modify",

@@ -34,3 +34,3 @@ "children"

"browserify": "^16.0.0",
"nyc": "^14.0.0",
"nyc": "^15.0.0",
"prettier": "^1.0.0",

@@ -41,3 +41,3 @@ "remark-cli": "^7.0.0",

"tinyify": "^2.0.0",
"xo": "^0.25.0"
"xo": "^0.26.0"
},

@@ -44,0 +44,0 @@ "scripts": {

@@ -21,3 +21,3 @@ # unist-util-modify-children

## Usage
## Use

@@ -54,5 +54,5 @@ ```js

children: [
{ type: 'leaf', value: '1' },
{ type: 'subtree', children: [ { type: 'leaf', value: '2' } ] },
{ type: 'leaf', value: '3' }
{type: 'leaf', value: '1'},
{type: 'subtree', children: [{type: 'leaf', value: '2'}]},
{type: 'leaf', value: '3'}
]

@@ -86,12 +86,25 @@ }

* [`unist-util-visit`](https://github.com/syntax-tree/unist-util-visit)
— Visit nodes
— Recursively walk over nodes
* [`unist-util-visit-parents`](https://github.com/syntax-tree/unist-util-visit-parents)
— Visit nodes with ancestral information
* [`unist-util-filter`](https://github.com/eush77/unist-util-filter)
— Like `visit`, but with a stack of parents
* [`unist-util-filter`](https://github.com/syntax-tree/unist-util-filter)
— Create a new tree with all nodes that pass a test
* [`unist-util-map`](https://github.com/syntax-tree/unist-util-map)
— Create a new tree with all nodes mapped by a given function
* [`unist-util-remove`](https://github.com/eush77/unist-util-remove)
* [`unist-util-flatmap`](https://gitlab.com/staltz/unist-util-flatmap)
— Create a new tree by mapping (to an array) with the provided function and
then flattening
* [`unist-util-find-after`](https://github.com/syntax-tree/unist-util-find-after)
— Find a node after another node
* [`unist-util-find-before`](https://github.com/syntax-tree/unist-util-find-before)
— Find a node before another node
* [`unist-util-find-all-after`](https://github.com/syntax-tree/unist-util-find-all-after)
— Find all nodes after another node
* [`unist-util-find-all-before`](https://github.com/syntax-tree/unist-util-find-all-before)
— Find all nodes before another node
* [`unist-util-find-all-between`](https://github.com/mrzmmr/unist-util-find-all-between)
— Find all nodes between two nodes
* [`unist-util-remove`](https://github.com/syntax-tree/unist-util-remove)
— Remove nodes from a tree that pass a test
* [`unist-util-select`](https://github.com/eush77/unist-util-select)
* [`unist-util-select`](https://github.com/syntax-tree/unist-util-select)
— Select nodes with CSS-like selectors

@@ -105,4 +118,4 @@

This project has a [Code of Conduct][coc].
By interacting with this repository, organisation, or community you agree to
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.

@@ -138,3 +151,3 @@

[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
[chat-badge]: https://img.shields.io/badge/chat-spectrum-7b16ff.svg

@@ -141,0 +154,0 @@ [chat]: https://spectrum.chat/unified/syntax-tree

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