onmyway133 / DeepDiff

🦀Amazingly incredible extraordinary lightning fast diffing in Swift
https://onmyway133.com/apps/
Other
2.05k stars 145 forks source link

"append" method ? #3

Closed JaleelNazir closed 6 years ago

JaleelNazir commented 6 years ago

Can also please add "append" method, it will be very useful for pagination. I want to do pagination in tableView by appending data to the existing array.

Can you please guide me ?

onmyway133 commented 6 years ago

I think we can just append items to existing array, and DeepDiff can just do the work. Or do you worry about performance?

let items = ["a", "b", "c"]
diff(old: [], new: items)

var newItems = items
newItems.append("d")
diff(old: items, new: newItems)