import { isArrayCount } from "./";
const findChildrenNode = (parent, name) => {
    const { children } = parent || {};
    let child = null;
    const _children = Array.prototype.slice.call(children);
    if (isArrayCount(_children)) {
        _children.forEach((item) => {
            if (item.name === name) {
                child = item;
            }
        });
    }
    return child;
};
export default findChildrenNode;
