Created
July 8, 2019 08:19
-
-
Save daybrush/710e4594cd64bd317426eec8002646b1 to your computer and use it in GitHub Desktop.
ordered, pureChanged
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ListDiffer from "@egjs/list-differ"; | |
const listDiffer = new ListDiffer([1, 2, 3, 4, 5, 6, 7], v => v); | |
const result = listDiffer.update([4, 3, 8, 2, 1, 7]); | |
// [[3, 0], [3, 1], [3, 2]] | |
console.log(result.ordered); | |
// [[3, 0], [2, 1], [1, 3]] | |
console.log(result.pureChanged); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment