Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
peers = mapPropsToResponse(torrentPeerPropsMap.props, peersData).map(peer => {
const geoData = geoip.lookup(peer.address) || {};
peer.country = geoData.country;
// Strings to boolean
peer.isEncrypted = peer.isEncrypted === '1';
peer.isIncoming = peer.isIncoming === '1';
return peer;
});
}