Emits a default value if the source is empty.
Type of items emitted by the source.
Value to emit if the source is empty.
Operation that emits a default value if the source is empty.
const result = defaultIfEmpty('A')([]);console.log([...result]); // ['A'] Copy
const result = defaultIfEmpty('A')([]);console.log([...result]); // ['A']
Emits a default value if the source is empty.