syntax-tree / unist-util-select
Showing 1 of 2 files from the diff.
Other files ignored by Codecov
test/matches.js has changed.

@@ -1,5 +1,7 @@
Loading
1 1
/**
2 +
 * @typedef {import('unist').Position} Position
2 3
 * @typedef {import('unist').Node} Node
4 +
 * @typedef {Record<string, unknown> & {type: string, position?: Position|undefined}} NodeLike
3 5
 */
4 6
5 7
import {any} from './lib/any.js'
@@ -7,7 +9,7 @@
Loading
7 9
8 10
/**
9 11
 * @param {string} selector
10 -
 * @param {Node} [node]
12 +
 * @param {NodeLike|Node} [node]
11 13
 * @returns {boolean}
12 14
 */
13 15
export function matches(selector, node) {
@@ -16,7 +18,7 @@
Loading
16 18
17 19
/**
18 20
 * @param {string} selector
19 -
 * @param {Node} [node]
21 +
 * @param {NodeLike|Node} [node]
20 22
 * @returns {Node|null}
21 23
 */
22 24
export function select(selector, node) {
@@ -25,8 +27,8 @@
Loading
25 27
26 28
/**
27 29
 * @param {string} selector
28 -
 * @param {Node} [node]
29 -
 * @returns {Array.<Node>}
30 +
 * @param {NodeLike|Node} [node]
31 +
 * @returns {Array<Node>}
30 32
 */
31 33
export function selectAll(selector, node) {
32 34
  return any(parse(selector), node, {any})
Files Coverage
lib 100.00%
index.js 100.00%
Project Totals (9 files) 100.00%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading