toObject (property)

toObject: ToObjectFn<T> = ...

Converts Opt to an object.

Example

opt(1).toObject() // {value: 1}
opt(undefined).toObject() // {value: null}
opt(undefined).toObject('id') // {id: null}

Param


Back to index