blob: caafd0aa511c503433a69284e9e1aae2da016031 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
let make = cns =>
cns->Belt.List.keep(x => x !== "") |> String.concat(" ") |> String.trim;
let ifTrue = (cn, x) => x ? cn : "";
let ifSome = (cn, x) =>
switch (x) {
| Some(_) => cn
| None => ""
};
let mapSome = (x, fn) =>
switch (x) {
| Some(x) => fn(x)
| None => ""
};
let unpack =
fun
| Some(x) => x
| None => "";
|