Skip to content

Commit 154c170

Browse files
authored
Update docs
2 parents 6df6bc0 + a1af623 commit 154c170

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

index.html

+10
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ <h2>API</h2>
119119

120120
<p><code>callback</code> is called with each node as the only argument.</p>
121121

122+
<p>Generate all tokens of a (sub)tree:</p>
123+
124+
<pre><code>parsel.flatten(node)</code></pre>
125+
126+
<p>This can be looped through with <code>for ... of</code>. Uses the same order as <code>walk</code></p>
127+
128+
<p>Convert a list of tokens or a (sub)tree to a string:</p>
129+
130+
<pre><code>parsel.stringify(listOrNode)</code></pre>
131+
122132
<p>Calculate specificity (returns an array of 3 numbers):</p>
123133

124134
<pre><code>parsel.specificity(selectorOrNode)</code></pre>

0 commit comments

Comments
 (0)