Get immediate child nodes of a passed element and return an array of them.

Parameters:
NameTypeDescription
elHTMLElement

The element to get all immediate children for.

Since
  • 1.0.0
Returns:

Iterable array of dom nodes.

Type: 
Array
Example
import { getChildren } from  "@gravityforms/utils";

function Example() {
 const node = document.getElementById( 'example' );
 const children = getChildren( node );
}