option-value
v1.6.0
Published
Optional value handling library.
Downloads
81
Maintainers
Readme
option-value
Handle nullable values in more convenient functional way.
Links:
Example usage:
import { Maybe } from 'option-value'
function func(): string | null { ... }
function process(value: string) { ... }
// Use
Maybe(func()).ifPresent(process)
// Instead of
let maybeString: string | null = func()
if (maybeString != null) {
process(maybeString)
}