Skip to content

Commit c5758dc

Browse files
committed
Check in compiled belt changes
1 parent 224b14a commit c5758dc

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

lib/es6/belt_Option.js

+9
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ function getWithDefault(opt, $$default) {
7777
}
7878
}
7979

80+
function orElse(opt, other) {
81+
if (opt !== undefined) {
82+
return opt;
83+
} else {
84+
return other;
85+
}
86+
}
87+
8088
function isSome(param) {
8189
return param !== undefined;
8290
}
@@ -132,6 +140,7 @@ export {
132140
flatMapU ,
133141
flatMap ,
134142
getWithDefault ,
143+
orElse ,
135144
isSome ,
136145
isNone ,
137146
eqU ,

lib/js/belt_Option.js

+9
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ function getWithDefault(opt, $$default) {
7777
}
7878
}
7979

80+
function orElse(opt, other) {
81+
if (opt !== undefined) {
82+
return opt;
83+
} else {
84+
return other;
85+
}
86+
}
87+
8088
function isSome(param) {
8189
return param !== undefined;
8290
}
@@ -131,6 +139,7 @@ exports.map = map;
131139
exports.flatMapU = flatMapU;
132140
exports.flatMap = flatMap;
133141
exports.getWithDefault = getWithDefault;
142+
exports.orElse = orElse;
134143
exports.isSome = isSome;
135144
exports.isNone = isNone;
136145
exports.eqU = eqU;

0 commit comments

Comments
 (0)