Skip to content

Instance Method

nonemptyFlatMap(or:_:)

Checks that the future’s value (if any) returns false for .isEmpty. If the check fails, a new future with the provided alternate value is returned. Otherwise, the provided normal flatMap() callback is invoked.
func nonemptyFlatMap<NewValue>(or alternate: @autoclosure @escaping () -> NewValue, _ transform: @escaping (Value) -> EventLoopFuture<NewValue>) -> EventLoopFuture<NewValue> where Value : Collection

See Also

EventLoopFuture