Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unist-util-remove

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unist-util-remove - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

6

index.js
'use strict'
var is = require('unist-util-is')
var convert = require('unist-util-is/convert')

@@ -8,2 +8,3 @@ module.exports = remove

function remove(ast, opts, test) {
var is
var cascade

@@ -18,2 +19,3 @@

cascade = cascade === null || cascade === undefined ? true : cascade
is = convert(test)

@@ -31,3 +33,3 @@ return preorder(ast, null, null)

if (is(test, node, nodeIndex, parent)) {
if (is(node, nodeIndex, parent)) {
return null

@@ -34,0 +36,0 @@ }

{
"name": "unist-util-remove",
"version": "1.0.2",
"version": "1.0.3",
"description": "Remove nodes from Unist tree",

@@ -30,3 +30,3 @@ "license": "MIT",

"dependencies": {
"unist-util-is": "^2.0.0"
"unist-util-is": "^3.0.0"
},

@@ -33,0 +33,0 @@ "devDependencies": {

@@ -7,2 +7,5 @@ # unist-util-remove

[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]

@@ -128,2 +131,12 @@ [**unist**][unist] utility to modify the given tree by removing all nodes that

[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[collective]: https://opencollective.com/unified
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
[chat]: https://spectrum.chat/unified/syntax-tree
[npm]: https://docs.npmjs.com/cli/install

@@ -130,0 +143,0 @@

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