( container: Node, nodes: Node[] | NodeSchema[], at?: number | null, copy?: boolean, )
| 868 | } |
| 869 | |
| 870 | export const insertChildren = ( |
| 871 | container: Node, |
| 872 | nodes: Node[] | NodeSchema[], |
| 873 | at?: number | null, |
| 874 | copy?: boolean, |
| 875 | ): Node[] => { |
| 876 | let index = at |
| 877 | let node: any |
| 878 | const results: Node[] = [] |
| 879 | while ((node = nodes.pop())) { |
| 880 | node = insertChild(container, node, index, copy) |
| 881 | results.push(node) |
| 882 | index = node.index |
| 883 | } |
| 884 | return results |
| 885 | } |
| 886 | |
| 887 | /** |
| 888 | * get the closest node that satisfies the condition |
no test coverage detected