Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise(function(res, rej) {
w3c.user({type: 'github', id: contributor.id}).fetch(function(err, /* w3cuser */) {
if (err) {
if (err.status === 404) {
// is the user known in ahsnazg local db?
if (ashnazgusers.indexOf(contributor.id) !== -1) {
return res(null);
} else {
return res({login: contributor.login, contributions: contributor.contributions});
}
} else {
return rej(err);
}
}
return res(null);
});
});
})).then(results => {