Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

mapForOption

Maps a Option<T> to Option<U> by applying a transformer function to an contained Some(T) value, leaving an None value untouched.

This function can be used to compose the results of two functions.

function mapForOption<T, U>(input: Option<T>, transformer: TransformFn<T, U>): Option<U>;
§
mapForOption<T, U>(input: Option<T>, transformer: TransformFn<T, U>): Option<U>
[src]

§Type Parameters

§Parameters

§
input: Option<T>
[src]
§
transformer: TransformFn<T, U>
[src]

§Return Type