code: function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
    if (enteringNodes) {
      // Perform a normal animation here, except - when it finishes - trigger
      // the transition for entering nodes.
      animate = assign({}, animate, { onEnd: cb });
      const before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : identity;
      // We want the entering nodes to be included in the transition target
      // domain.  However, we may not want these nodes to be displayed initially,
      // so perform the `onEnter.before` transformation on each node.
      data = data.map((datum, idx) => {
        const key = (datum.key || idx).toString();
        return enteringNodes[key] ? assign({}, datum, before(datum, idx, data)) : datum;
      });
    }
  
    return { animate, data };
  }
docs: eslint-disable-next-line max-params,max-len