Transforms the success value, passing failures through unchanged. If fn throws, that exception propagates; it is not converted into err.
fn
err
const names = mapResult(result, (projects) => projects.map((p) => p.name)); Copy
const names = mapResult(result, (projects) => projects.map((p) => p.name));
Transforms the success value, passing failures through unchanged. If
fnthrows, that exception propagates; it is not converted intoerr.