unist-util-select
Advanced tools
Comparing version 3.0.3 to 3.0.4
@@ -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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27662
588