3 var convert = require('unist-util-is/convert')
5 module.exports = findAllAfter
7 function findAllAfter(parent, index, test) {
14 if (!parent || !parent.type || !parent.children) {
15 throw new Error('Expected parent node')
18 children = parent.children
19 length = children.length
21 if (index && index.type) {
22 index = children.indexOf(index)
25 if (isNaN(index) || index < 0 || index === Infinity) {
26 throw new Error('Expected positive finite index or child node')
29 while (++index < length) {
30 child = children[index]
32 if (is(child, index, parent)) {