Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
i += direction;
if (i < 0 || i >= len) {
return cb(false);
}
const plugin = plugins[i];
const pluginAction = plugin[event];
if (!pluginAction || !applyOrReturn([context], propOr('shouldExecute', true, plugin))) {
return next();
}
try {
pluginAction(context, once(next), makeRequest);
} catch (err) {
return next({ status: Status.ERROR, error: err });
}
};