Skip to content

unctionjs/thenCatchP

Repository files navigation

@unction/thenCatchP

Tests Stability Dependencies

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]))

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published