isc30 / linq-collections

Strongly typed Linq and Collections implementation for Javascript and TypeScript (ECMAScript 5)
https://www.npmjs.com/package/linq-collections
MIT License
119 stars 12 forks source link

DefaultIfEmpty #30

Closed isc30 closed 6 years ago

isc30 commented 6 years ago

Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty

defaultIfEmpty(): IEnumerable<TOut | undefined>;
defaultIfEmpty(defaultValue: TOut): IEnumerable<TOut>;

Uses streamed deferred execution