CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Oct 2016 |
SPMSupports SPM | ✓ |
Maintained by Chris Amanse, Chris Amanse.
A Swift framework that computes changes occurred in a CollectionType
. Elements of the collection should also conform to Equatable
. Inspired by Changeset.
github "chrisamanse/Changes" ~> 2.0
in your Cartfile
pod "Changes"
in your Podfile
.Package(url: "https://github.com/chrisamanse/Changes.git, majorVersion: 2)
in dependenciesGet changes of a Collection
with elements that conform to Equatable
.
let oldArray = [1,2,3,4,5]
let newArray = [1,3,2,4]
// Get changes
let changes = newArray.changes(since: oldArray)
// Prints out ["Moved 3 from index 2 to 1", "Deleted 5 at index 4"]
print(changes)
Copyright © 2016 Joe Christopher Paul Amanse
This software is distributed under the MIT License.