UNPKG

promise-toolbox

Version:
13 lines (10 loc) 236 B
"use strict"; const isProgrammerError = require("./_isProgrammerError"); const cb = error => { if (isProgrammerError(error)) { throw error; } }; module.exports = function ignoreErrors() { return this.then(undefined, cb); };