UNPKG

rabbit-simple-ui

Version:

A simple UI component library based on JavaScript

11 lines (10 loc) 262 B
export default function siblings(elem: Element): any[] { const r = []; let n = elem.parentNode?.firstChild; for (; n; n = n.nextSibling) { if (n.nodeType === 1 && n !== elem) { r.push(n); } } return r; }