https://github.com/rrainn/utilswift
📦 Swift Package - Utilities to make Swift Easy
https://github.com/rrainn/utilswift
package swift utilities
Last synced: 3 months ago
JSON representation
📦 Swift Package - Utilities to make Swift Easy
- Host: GitHub
- URL: https://github.com/rrainn/utilswift
- Owner: rrainn
- License: mit
- Created: 2017-12-14T00:09:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-17T05:52:47.000Z (over 7 years ago)
- Last Synced: 2025-03-28T05:28:53.771Z (3 months ago)
- Topics: package, swift, utilities
- Language: Swift
- Homepage:
- Size: 212 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# utilswift
[](https://travis-ci.org/rrainn/utilswift)
[](https://codecov.io/gh/rrainn/utilswift)
[](http://cocoapods.org/pods/utilswift)
[](http://cocoapods.org/pods/utilswift)
[](http://cocoapods.org/pods/utilswift)## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
- iOS 8.0+
## Installation
utilswift is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'utilswift'
```## Author
rrainn, Inc., [email protected]
## License
utilswift is available under the MIT license. See the LICENSE file for more info.
## Documentation
### Array
**`randomElement`**
This method returns a randomElement from an array. If array is empty this method will return `nil`.
```
let array: [Int] = [1, 2, 3, 4, 5]
print(array.randomElement()!)
```