Get all siblings of an element
JavaScript
const siblings = (ele) => [].slice.call(ele.parentNode.children).filter((child) => child !== ele)
TypeScript
const siblings = (ele: Node): Node[] => (ele.parentNode ? [].slice.call(ele.parentNode.children).filter((child) => child !== ele) : [])