Commit Graph

66 Commits

Author SHA1 Message Date
Oleksii Pyvovarov c1f2720c61 Fixed warnings, errors - updated tests 2019-12-24 21:39:22 +02:00
yangxichuan a29a2205f2 Surport Swift 5 2019-05-13 18:35:55 -07:00
Arunav Sanyal 49fa5ce305 Reverting certain swift 4.1 mandatory changes. 2018-08-25 19:48:20 -07:00
Arunav Sanyal b91680b00a
Final merge for swift 4 (#476)
* Swift 4
2018-06-22 19:26:59 -07:00
Lucas Farah 9b58d8b2ae Safe array extension (#445)
* Added new safe array extension
2017-09-03 10:51:59 -07:00
Arunav Sanyal 0b619317e1 Adding fix to ensure removeAll() from std lib does not clash with
EZSwiftExtensions. Also adding test cases to ensure that never
happens again.
2017-07-09 23:11:39 -07:00
Arunav Sanyal c799895b53 Adding support for MACOSX XCode target. 2017-06-12 10:34:54 -07:00
Arunav Sanyal c968ce8d73 Converting all UIKit packages to be buildable for only tvOS or IOS.
This would allow EZSwiftExtensions to be usable in other platforms (MacOS and Linux)
2017-05-30 20:12:29 -07:00
David F 76bb189df0 Added two overloads for the 'removeAll(_:)' extension of 'Array' (#416)
* Added two overloads for the 'removeAll(_:)' extension of 'Array'
* One for an array parameter rather than a variadic one
* Another one for an array parameter but for a more specific overload;
elements conforming to Hashable.

Updated the existing variadic overload to simply call the new array one.

Extended the existing test 'testRemoveObjects()' into once testing the
single variadic overload and one testing the two new array overloads.

Swiftlint @ ArrayExtensions OK.

* Added changelog entry
2017-04-28 15:18:20 -07:00
dfrib 046eef607f Refactoring some Array extensions
Swiftlint @ ArrayExtensions OK.
2017-04-23 17:16:07 -07:00
dfrib 05c6a761bc Fixed broken Array extension get(at:) (+test)
The get(at:) extension previously led to a runtime exception when being
called from empty arrays ([]), as the constructed ClosedRange
'lowerBound...upperBound' would yield the invalid ClosedRange '0...-1'
for most supplied ranges.

Also extended the testGet_SubArray() test of ArrayTests to test the
extension on empty arrays (which would've caught the case above).
2017-04-23 16:42:45 -07:00
Arunav Sanyal dec0a9771b <Description> : Removing foreach and removeAll since it conflicts with the std library.
<Type> : fix
2017-02-21 10:01:53 -08:00
Arunav Sanyal 928d825dcc <Description> : Removing for each since its already in the std library.
<Type> : fix
2017-02-19 19:11:15 -08:00
Lucas Farah 1885a24296 Fixed some swiftlint warnings 2017-01-25 10:14:52 +05:30
furuyan cd34f55ed1 Fixed swxftlint warnings. 2016-11-09 16:58:27 +09:00
Dendim0n 0ec8f569db add test of get(at range:ClosedRange<Int>) 2016-10-25 12:20:33 +08:00
Dendim0n f72b763803 add sub array function to Array 2016-10-20 14:31:17 +08:00
Olexii Pyvovarov 371278ed85 fixed swiftlint warnings 2016-10-20 01:33:42 +03:00
Sanyal 53c4b45c65 <Description> : Adding a new array extension that returns only the unique elements in the array.
<Type> : feature/test
2016-10-18 00:23:10 -07:00
Olexii Pyvovarov e4609cea02 Merge branch 'master' of https://github.com/goktugyil/EZSwiftExtensions
# Conflicts:
#	Sources/ArrayExtensions.swift
2016-10-05 00:22:04 +03:00
Olexii Pyvovarov a85d701c91 fixed reverseIndex for tests 2016-10-04 22:12:47 +03:00
Olexii Pyvovarov 5edda8d26c small renaming 2016-09-28 10:03:05 +03:00
Olexii Pyvovarov 4ebbadc4ab Swift 3 API Design guidelines
Small fixes
shuffled()
change methods bodies
Reordered (Deprecated methods move to the bottom)
2016-09-27 21:47:21 +03:00
Goktug Yilmaz 6d717e733d Fixed deprecated auto fix methods 2016-09-27 16:26:28 +03:00
Goktug Yilmaz a215318125 Fixed white space warnings 2016-09-27 16:21:25 +03:00
Goktug Yilmaz a6aed390f0 Changed name of forEach so its not overriden with Apple's version 2016-09-27 13:47:46 +03:00
Goktug Yilmaz ffd3812d22 Removed func bodies of deprecated funcs 2016-09-27 11:56:07 +03:00
Goktug Yilmaz 0f7fc48205 Changed func names 2016-09-27 11:52:13 +03:00
Goktug Yilmaz 2cf1a8c594 ArrayExtensions renames 2016-09-27 11:46:06 +03:00
Goktug Yilmaz 27cdf047ff piv199's Array.contains fix 2016-09-27 11:05:32 +03:00
Olexii Pyvovarov 201850843f Swift 3 support for Xcode 8 + all tests 2016-09-20 01:48:19 +03:00
Goktug Yilmaz 15504041df Added better docs to array.foreach 2016-09-03 11:57:33 +03:00
Goktug Yilmaz d30454ef8b Merge pull request #172 from Yu-w/remove-each
deprecate each in Array Extension
2016-08-19 09:26:29 +03:00
Goktug Yilmaz 2e68ecd37a Merge pull request #174 from Yu-w/functional
deprecate `mapFilter` function in Array Extension
2016-08-19 09:25:44 +03:00
Yu Wang b84cb5c77c deprecate mapFilter function in Array Extension 2016-08-17 08:40:32 -07:00
Yu Wang 0fc566e011 deprecate another each function with index 2016-08-16 23:43:01 -07:00
Yu Wang dd85fad2f4 deprecate each in Array Extension 2016-08-16 23:33:16 -07:00
Yu Wang 2848c2c265 add tests 2016-08-16 23:21:02 -07:00
Yu Wang d4695f0f95 add decompose function in Array to return a tuple with first element and the rest 2016-08-16 22:44:05 -07:00
Mahdi Bchetnia b6aab23a79
Fixed whitespace issues with `swiftlint autocorrect` 2016-07-07 18:18:43 +09:00
Lucas Farah 0def725881 Fixed Swiftlint warnings 2016-05-26 12:56:25 -07:00
Daniel Lopez 1956eb787a shuffle() now uses Fisher-Yates-Durstenfeld algo
Implemented shuffle() using the Fisher-Yates-Durstenfeld algorithm. A proven in-place shuffling algorithm.
2016-04-08 11:22:32 -04:00
Daniel Lopez 9630fb48fa Added shuffle() to ArrayExtensions.swift
shuffle() creates an array that is a shuffled version of the array.
2016-04-08 11:22:32 -04:00
inket a97ecdac40 No more force casting 😣 2016-03-29 16:15:00 +09:00
inket f2f1e911a7 Fixed spacing/style issues 2016-03-29 16:15:00 +09:00
inket 11023a6b6f Fixed whitespacing issues 2016-03-29 16:15:00 +09:00
Goktug Yilmaz 910c22ecf2 Added Array.testIfAllIs(Bool:) 2016-03-23 13:57:19 +02:00
Fabio Teles f17c07962a Add missing tests for Array extensions. Make each public again with tests. Remove use of deprecated method. 2016-03-22 08:31:41 -07:00
Goktug Yilmaz 4df263ace1 Update ArrayExtensions.swift 2016-03-15 15:07:25 +02:00
Goktug Yilmaz 487d41f75c Made new array funcs public 2016-03-15 09:25:12 +02:00