UNPKG

rabbit-design

Version:

A lightweight UI plugin library written in TypeScript and 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; }