Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jakubpetrik/isnotempty

IsNotEmpty
https://github.com/jakubpetrik/isnotempty

Last synced: about 7 hours ago
JSON representation

IsNotEmpty

Awesome Lists containing this project

README

        

# IsNotEmpty

```swift
import Foundation

extension Collection {
var isNotEmpty: Bool { !isEmpty }
}

extension Optional where Wrapped: Collection {
var isNotEmpty: Bool {
switch self {
case .none:
return false
case .some(let collection):
return collection.isNotEmpty
}
}
}

```