SwifterSwift v1.6.4 Release Notes
-
- New Array extensions
- added
removeAll
passing an array of items. - added
swap
andsafeSwap
extensions to swap to elements in an array. - new
firstIndex
andlastIndex
that returns the (first or last) index where the condition is true. - new
indexes
extension that return indexes where the condition is true. - new
all
andnone
that checks if (all or none) of array elements match condition. - new
last
extension to find the last element that matches condition. - new
reject
extension to filter elements that not matches condition. - new
count
extension to count elements that match condition. - new
forEachReversed
extension to iterate over an array in reverse order. - new
accumulate
extension to reduces an array while returning each interim combination. - new
forEach
with condition to a filtered interaction over the array. - new
keep
extension to keep all elements that in order are until the condition is false. - new
take
extension that returns all elements that in order are until the condition is false. - new
skip
extension that returns all elements that in order are after the condition is false. - new
filtered: map
extension to perform a map and filter operation in just one iteration.
- added
- New Character extensions
- added isLetter & isWhiteSpace extensions
- new lowercased extension to lower case the character
- new uppercased extension to upper case the character
- New Date extensions
- new
isInWeekday
extension to check if the date is within a weekday period
- new
- New Dictionary extensions
- new
removeAll
extension to remove the values for all keys in an array. - new + operator to merge to dictionaries in a new one and += to merge one dictionary into another.
- new - operator to get a new dictionary with the values for all keys in an array removed and -= to remove the values for all keys in an array.
- new
- New String extensions
- new
matches
extension to check if the string matches a regex pattern.
- new
- New Locale extensions
- new posix property extension to convenience create the "en_US_POSIX" locale.
- New CLLocation extensions
- new
midLocation
to find the half-way point along a great circle path between relative to another point. - new
bearing
to calculate the bearing relative another location. ### ๐ Improvements
- new
- ๐ Fixes on wrong access levels for some extensions
- ๐ Improve NSAttributedStringExtensions extensions
- ๐ Fixes on implementations of some array extensions
- ๐ Fixes on some UIButtonExtensions
- ๐ Improvements on some Date extensions
- ๐ Improvements on some methods signatures based on Swift 3 API guidelines
- ๐ Improve code coverage.
- ๐ Improvements on documentation headers
โ Testing
๐ This release has drastically increased test coverage: currently 92%. Areas affected are:
Foundation
- ArrayExtensions tests - CharacterExtensions tests - DateExtensions tests - DictionaryExtensions tests - StringExtensions tests - LocaleExtensions tests
UIKit
- UIColorExtensions tests - UIButtonExtensions tests
Cocoa
- CGSizeExtensions tests - CGPointExtensions tests - CLLocationExtensions tests
- New Array extensions