'use strict';

/*
 * Returns a function that will handle an error if it passes the predicate function test,
 * or if it matches the object.
 * If the predicate returns false, the error is propagated.
 */
module.exports = function (predicateFn, fn) {
    return function (err) {
        if ((err instanceof Error && err instanceof predicateFn) || predicateFn(err)) {
            return fn(err);
        }

        throw err;
    };
};

@@ -9,16 +9,14 @@
 ict'
-;
 %0A%0A/*%0A 
-*
  Ret
@@ -69,16 +69,18 @@
 t passes
+%0A 
  the pre
@@ -100,19 +100,16 @@
 on test,
-%0A *
  or if i
@@ -131,17 +131,16 @@
 bject.%0A 
-*
  If the 
@@ -193,12 +193,13 @@
 ed.%0A
- 
+%0A
 */%0A
+%0A
 modu
@@ -210,25 +210,16 @@
 xports =
- function
  (predic
@@ -233,44 +233,20 @@
 fn) 
-%7B%0A    return function (err) %7B%0A      
+=%3E err =%3E %7B%0A
   if
@@ -323,24 +323,16 @@
 err)) %7B%0A
-        
     retu
@@ -345,27 +345,14 @@
 err)
-;%0A      
+%0A
   %7D%0A%0A
-      
   th
@@ -362,16 +362,7 @@
  err
-;%0A    %7D;%0A%7D;
+%0A%7D
 %0A

update promise/catchif — lint, es6