A catIf syntactic sugar for Javscrip promises
npm i catch-if -S
require('catch-if')(Promise);
Promise.reject( new TypeError() )
.catchIf( TypeError, function handler(err){ console.log('TypeError handled')} )
.catchIf( RangeError, function handler(err){ console.log('RangeError handled')} )