vanillajs-browser-helpers
Version:
Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS in the browser
14 lines (13 loc) • 306 B
TypeScript
/**
* Find the children of a given DOM element and return it as an Array
*
* @param elm - DOM element to find children from
* @return List of found child DOM elements
*
* @example
*
* ```ts
* children(someDiv);
* ```
*/
export default function children(elm: ParentNode): Element[];