function nthChild(node, ancestry, idxFn) {
    const parent = ancestry[0];
    if (!parent) {
      return false;
    }
    const keys = Object.keys(parent);
    for (i = 0; i < keys.length; ++i) {
      const listProp = parent[keys[i]];
      if (Array.isArray(listProp)) {
        const idx = listProp.indexOf(node);
        if (idx >= 0 && idx === idxFn(listProp.length)) {
          return true;
        }
      }
    }
    return false;
  }
/*
   * Determines if the given node is the nth child, determined by idxFn, which is given the containing list's length.
   */
Determines if the given node is the nth child, determined by idxFn, which is given the containing list's length.
Determines if the given node is the nth child determined by idxFn which is given the containing list ' s length .
function nthChild(node, ancestry, idxFn) {
    const parent = ancestry[0];
    if (!parent) {
      return false;
    }
    const keys = Object.keys(parent);
    for (i = 0; i < keys.length; ++i) {
      const listProp = parent[keys[i]];
      if (Array.isArray(listProp)) {
        const idx = listProp.indexOf(node);
        if (idx >= 0 && idx === idxFn(listProp.length)) {
          return true;
        }
      }
    }
    return false;
  }
function nthChild ( node , ancestry , idxFn ) { const parent = ancestry [ 0 ] ; if ( ! parent ) { return false ; } const keys = Object . keys ( parent ) ; for ( i = 0 ; i < keys . length ; ++ i ) { const listProp = parent [ keys [ i ] ] ; if ( Array . isArray ( listProp ) ) { const idx = listProp . indexOf ( node ) ; if ( idx >= 0 && idx === idxFn ( listProp . length ) ) { return true ; } } } return false ; }
Determines if the given node is the nth child, determined by idxFn, which is given the containing list's length.
Determines if the given node is the nth child determined by idxFn which is given the containing list ' s length .