Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
results.rows = results.rows.map((r) => {
const ref = constants.countries[r.loccountrycode];
r.common = ref ? ref.name.common : r.loccountrycode;
return r;
});
return results;
results.rows = results.rows.map((r) => {
const ref = constants.countries[r.loccountrycode];
r.common = ref ? ref.name.common : r.loccountrycode;
return r;
});
};