@unction/thencatchp
v4.2.4
Published
A currable version of the Promise.prototype.then() function with a catch
Downloads
3
Readme
@unction/thenCatchP
MapperFunctionType<A, B> => MapperFunctionType<C, B> => Promise => Promise<D | B>
A port of the Promise.prototype.then()
function, but with the extra catch argument.
Credit: @keithamus
thenCatchP(
([user, project]) => console.log(user, project)
)(
(exception) => console.error(exception)
)(Promise.all([fetchUser, fetchProject]))