src/diff.js
function sharedPrefix(current, old, searchLength) {
    for (var i = 0; i < searchLength; i++) {
      if (diffBasic(current[i], old[i])) {
        return i;
      }
    }
    return searchLength;
  }
function sharedPrefix(current, old, searchLength) {
    for (var i = 0; i < searchLength; i++) {
      if (diffBasic(current[i], old[i])) {
        return i;
      }
    }
    return searchLength;
  }
function sharedPrefix ( current , old , searchLength ) { for ( var i = 0 ; i < searchLength ; i ++ ) { if ( diffBasic ( current [ i ] , old [ i ] ) ) { return i ; } } return searchLength ; }
find the number of items at the beginning that are the same
find the number of items at the beginning that are the same