src/transform/tree.js
// Get the number of path levels that two positions have in common.
Get the number of path levels that two positions have in common.
Get the number of path levels that two positions have in common .
function samePathDepth(a, b) {
  for (let i = 0;; i++)
    if (i == a.path.length || i == b.path.length || a.path[i] != b.path[i])
      return i
}
function samePathDepth ( a , b ) { for ( let i = 0 ; ; i ++ ) if ( i == a . path . length || i == b . path . length || a . path [ i ] != b . path [ i ] ) return i }
Get the number of path levels that two positions have in common.
Get the number of path levels that two positions have in common .