Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rrainn/utilswift
📦 Swift Package - Utilities to make Swift Easy
https://github.com/rrainn/utilswift
package swift utilities
Last synced: 23 days 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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-17T05:52:47.000Z (about 7 years ago)
- Last Synced: 2024-12-09T16:56:02.032Z (30 days ago)
- Topics: package, swift, utilities
- Language: Swift
- Homepage:
- Size: 212 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# utilswift
[![CI Status](http://img.shields.io/travis/rrainn/utilswift.svg?style=flat)](https://travis-ci.org/rrainn/utilswift)
[![codecov](https://codecov.io/gh/rrainn/utilswift/branch/master/graph/badge.svg)](https://codecov.io/gh/rrainn/utilswift)
[![Version](https://img.shields.io/cocoapods/v/utilswift.svg?style=flat)](http://cocoapods.org/pods/utilswift)
[![License](https://img.shields.io/cocoapods/l/utilswift.svg?style=flat)](http://cocoapods.org/pods/utilswift)
[![Platform](https://img.shields.io/cocoapods/p/utilswift.svg?style=flat)](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()!)
```