Skip to content

unctionjs/catchP

Repository files navigation

@unction/catchP

Tests Stability Dependencies

MapperFunctionType<C, B> => Promise => Promise<A | B>

A port of the Promise.prototype.catch() function.

catchP(
  (exception) => console.error(exception)
)(Promise.all([fetchUser, fetchProject]))

Credit: @keithamus