()
| 1368 | * @since 4.0.0 |
| 1369 | */ |
| 1370 | export function optionFromOptional<T>(): Transformation<Option.Option<T>, T | undefined> { |
| 1371 | return transformOptional<Option.Option<T>, T | undefined>({ |
| 1372 | decode: (ot) => ot.pipe(Option.filter(Predicate.isNotUndefined), Option.some), |
| 1373 | encode: Option.flatten |
| 1374 | }) |
| 1375 | } |
| 1376 | |
| 1377 | /** |
| 1378 | * Decodes a `string` into a `URL` and encodes a `URL` back to its `href` |
nothing calls this directly
no test coverage detected