Promises That Don’t Fail

Introduction
My co-worker, Jason Kaiser, created a way for Promises not to fail, called sureThing. It has 3 benefits to your code that we’ll illustrate below, including prior art in other programming languages so you know this isn’t some made-up concept.
What Is a SureThing?
A sureThing is a function that wraps a Promise to ensure it never fails. The return value given to the .then is an object, letting you know if the operation succeeded or not.

Link: https://dzone.com/articles/promises-that-dont-fail?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev