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

unist-util-select

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unist-util-select - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

8

index.js

@@ -11,11 +11,13 @@ 'use strict'

function matches(selector, node) {
return Boolean(any(parse(selector), node, {one: true, shallow: true})[0])
return Boolean(
any(parse(selector), node, {one: true, shallow: true, any: any})[0]
)
}
function select(selector, node) {
return any(parse(selector), node, {one: true})[0] || null
return any(parse(selector), node, {one: true, any: any})[0] || null
}
function selectAll(selector, node) {
return any(parse(selector), node, {})
return any(parse(selector), node, {any: any})
}

@@ -55,3 +55,4 @@ 'use strict'

one: state.one,
shallow: state.shallow
shallow: state.shallow,
any: state.any
})

@@ -58,0 +59,0 @@ )

@@ -8,3 +8,2 @@ 'use strict'

var convert = require('unist-util-is/convert')
var anything = require('./any')

@@ -65,2 +64,3 @@ var is = convert()

var one = state.one
var anything = state.any
var result

@@ -165,2 +165,3 @@

var value = appendScope(query.value)
var anything = state.any
var result

@@ -167,0 +168,0 @@

{
"name": "unist-util-select",
"version": "3.0.3",
"version": "3.0.4",
"description": "unist utility to select nodes with CSS-like selectors",

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

"unist-builder": "^2.0.0",
"xo": "^0.35.0"
"xo": "^0.36.0"
},

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

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