loopChildren = ({ node }, callback) => {
  for (const [childKey, childVal] of Object.entries(node)) {
    if (childKey === 'span') {
      // eslint-disable-next-line no-continue
      continue;
    }

    if (Array.isArray(childVal)) {
      for (const childValElem of childVal) {
        callback({ child: childValElem });
      }
    } else if (typeof childVal === 'object') {
      callback({ child: childVal });
    }
  }
}
@param {{node: SwcNode; }} node
@param {(data:{child:SwcNode}) => void} callback