Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Add getOrElse pipe #85

Open
ciukstar opened this issue Dec 17, 2018 · 0 comments
Open

Add getOrElse pipe #85

ciukstar opened this issue Dec 17, 2018 · 0 comments

Comments

@ciukstar
Copy link

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request

Current behavior
No pipe for simple getOrElse function

Expected behavior
Equivalent to ts-option option(x).getOrElse(y).
Ex:
'a' | getOrElse : 'b' -> 'a'
1 | getOrElse : 2 -> 1
let x: any;
null | getOrElse : x -> x
undefined | getOrElse : x -> x

What is the motivation / use case for changing the behavior?
Very util function

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant