Calculates the difference between two arrays or strings producing an array containing a list of changes necessary to transform input into output. diff( 'aba', 'acca' ); // [ 'equal', 'insert', 'insert', 'delete', 'equal' ] This function is based on the "O(NP) Sequence Comparison ...
we treat it as a set of children,// not as a fragment. Nested arrays on the other hand will be treated as// fragment nodes. Recursion happens at the normal flow.// Handle
constFAUX_ITERATOR_SYMBOL='@@iterator';constMAYBE_ITERATOR_SYMBOL=typeofSymbol==='function'&&Symbol.iterator;exportfunctiongetIteratorFn(maybeIterable:?any):?()=>?Iterator<*>{if(maybeIterable===null||typeofmaybeIterable!=='object'){returnnull;}constmaybeIterator=(MAYBE_ITERATOR_SYMBOL&&maybeIterabl...
getChangeType()) { case ADD: iterable = git.log().addPath(diffEntry.getNewPath()).setMaxCount(1).call(); latestCommit = iterable.iterator().next(); if (latestCommit == null) { iterable = git.log().setMaxCount(1).call(); latestCommit = iterable.iterator().next(); } commitTime...
// work on Iterables, we'd need to copy the whole set. // In this first iteration, we'll just live with hitting the bad case // (adding everything to a Map) in for every insert/move. // If you change this code, also update reconcileChildrenIterator() which ...