Break out of async completely if condition met
<p>How to make a async.each loop break and return a specific value / error when a condition is met. For instance, in this case, if status exists i wish to return something from the function 'check' rather than iterating through rest of the items. Any suggestions?</p>

<pre><code>const check = (condition) =&gt; {

    if (condition === 100) {

           async.each(items, (item, callback) =&gt; {

               if (status) {

                    callback(Boom.conflict('Conflict'));
                } else {

                    // some logic
                    callback(destroyInstance);
                }
           });
     }
};
</code></pre>