unist-util-select
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -10,2 +10,6 @@ 'use strict'; | ||
var select = function select (ast, selector) { | ||
if (arguments.length == 1) { | ||
return select.bind(this, ast); | ||
} | ||
debug('Selector: %j', selector); | ||
@@ -20,2 +24,6 @@ selector = parseSelector(selector); | ||
select.one = function selectOne (ast, selector) { | ||
if (arguments.length == 1) { | ||
return selectOne.bind(this, ast); | ||
} | ||
var nodes = select(ast, selector); | ||
@@ -22,0 +30,0 @@ |
{ | ||
"name": "unist-util-select", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Select unist nodes using css-like selectors", | ||
@@ -5,0 +5,0 @@ "author": "Eugene Sharygin <eush77@gmail.com>", |
@@ -85,8 +85,12 @@ [![npm](https://nodei.co/npm/unist-util-select.png)](https://npmjs.com/package/unist-util-select) | ||
#### `select(ast, selector)` | ||
### `select(ast, selector)` | ||
*Curried form: `select(ast)(selector)`* | ||
Applies `selector` to `ast`, returns array of matching nodes. | ||
#### `select.one(ast, selector)` | ||
### `select.one(ast, selector)` | ||
*Curried form: `select.one(ast)(selector)`* | ||
Returns a single node matching `selector`. | ||
@@ -93,0 +97,0 @@ |
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
16139
370
108