Если нужно оборачиваем children в <span>
@param  {ReactElement} children
@return {ReactElement}
487431
function wrapChildren(children) {
  let shouldWrap = Children.count(children) > 1
  if (!shouldWrap)
    Children.forEach(children, child => {
      shouldWrap = typeof child === 'string'
    })
  if (shouldWrap) return <span>{children}</span>
  return children
}
1070552
function (child) {
            var index = 0,
                element;

            for (var i = 0; i < this.$parent.$children.length; i++) {
                element = this.$parent.$children[i];
                if (element === this) {
                    return ++index;
                } else {
                    index++;
                }
            }
            return index;
        }
72857
public function prependChildren($children, $mapper = null)
    {
        $children = $this->parseChildren($children, $mapper);

        $element = clone $this;

        $element->children = $children->merge($element->children);

        return $element;
    }
334235
function childrenByClass(element, name) {
  var filtered = [];

  for (var i = 0; i < element.children.length; i++) {
    var child = element.children[i];
    var classNames = child.className.split(' ');
    if (classNames.indexOf(name) !== -1) {
      filtered.push(child);
    }
  }

  return filtered;
}
212215
function Link({ to, children }) {
  function click(e) {
    e.preventDefault()
    navigate(to)
  }

  return <a href={to} onClick={click}>
    {children}
  </a>
}
1308251
function scanChildren(element) {
        var found;
        if (element) {
          for (var i = 0, len = element.length; i < len; i++) {
            var target = element[i];
            if (!found) {
              for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) {
                found = found || scanTree([target.childNodes[j]]);
              }
            }
          }
        }
        return found;
      }
1286338
function forEach(children, func) {
  let index = 0;
  React.Children.forEach(children, child => {
    if (React.isValidElement(child)) func(child, index++);
  });
}
450182
function h(tag, props, ...children) {
    const overrideProps = get(options.overrides, `${tag}.props`, {});

    return createElementFn(
      getTag(tag, options.overrides),
      {
        ...props,
        ...overrideProps,
        className:
          cx(props && props.className, overrideProps.className) || undefined,
      },
      ...children
    );
  }
1019218
function(node, nodeType)
	{
		nodeType = nodeType || mxConstants.NODETYPE_ELEMENT;
		
		var children = [];
		var tmp = node.firstChild;
		
		while (tmp != null)
		{
			if (tmp.nodeType == nodeType)
			{
				children.push(tmp);
			}
			
			tmp = tmp.nextSibling;
		}
		
		return children;
	}
1221794
function UpChildren(elt, children) {
  var f = C(function _UpChildren(children) {

    filter.call(elt.childNodes, child => children.indexOf(child) === -1)
      .forEach(removeChild, elt);

    children
      .filter(Boolean)
      .map(c => typeof c.valueOf() === 'string' ? T(c) : c)
      .forEach(appendChild, elt);
  });

  // Permit any combination of single nodes and arrays as arguments.
  f(Array.isArray(children) ? children : [children]);
  return elt;
}
693380
function Grid(props) {
  const grid = new contrib.grid({...props, screen: { append: () => {} }});
  const children = props.children instanceof Array ? props.children : [props.children];
  return React.createElement(props.component || 'element', {}, children.map((child, key) => {
    const props = child.props;
    const options = grid.set(props.row, props.col, props.rowSpan || 1, props.colSpan || 1, x => x, props.options);
    options.key = key;
    return React.cloneElement(child, options);
  }));
}
154877
function renderNode(node, children = []) {
    [...children].forEach(child => {
        if (child && child.tag) {
            node.ele(child.tag, child.props);
            renderNode(node, child.children);
            node.end();
        } else {
            node.text(child);
        }
    });
}
416765
function(tag, attrs, children){
    var el = document.createElement(tag);

    if(attrs != null && typeof attrs === typeof {}){
      Object.keys(attrs).forEach(function(key){
        var val = attrs[key];

        el.setAttribute(key, val);
      });
    } else if(typeof attrs === typeof []){
      children = attrs;
    }

    if(children != null && typeof children === typeof []){
      children.forEach(function(child){
        el.appendChild(child);
      });
    } else if(children != null && typeof children === typeof ''){
      el.appendChild(document.createTextNode(children));
    }

    return el;
  }
517413
public function renderChildren($children = null)
    {
        if (null === $children) {
            $children = $this->getChildren();
        }

        if (!is_array($children)) {
            throw new Exception\InvalidArgumentException(
                'Invalid children type supplied. Expected array or null.'
            );
        }

        $content = '';

        /* @var $child HtmlElement */
        foreach ($children as $child) {
            $content .= $child->render();
        }

        return $content;
    }
507949
public function addChildren(array $children)
    {
        if ($this->isVoid) {
            throw new Exception\RuntimeException(
                'Void elements can\'t have child elements.'
            );
        }

        foreach ($children as $child) {
            $this->addChild($child);
        }

        return $this;
    }
694769
function getLabel(children) {
  let str = '';

  if (Array.isArray(children)) {
    children.forEach(c => {
      if (Array.isArray(c)) {
        getLabel(c);
      } else if (c.props) {
        str = c.props.children;
      } else {
        str = c;
      }
    });
  } else if (children.props) {
    getLabel(children.props.children);
  } else {
    str = children;
  }

  return str;
}
1215589
function flattenChildren(children, selfDebugID) {
	  if (children == null) {
	    return children;
	  }
	  var result = {};

	  if (process.env.NODE_ENV !== 'production') {
	    traverseAllChildren(children, function (traverseContext, child, name) {
	      return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
	    }, result);
	  } else {
	    traverseAllChildren(children, flattenSingleChildIntoContext, result);
	  }
	  return result;
	}