Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private createDevice(
address: string,
macAddress: string,
friendlyName: string,
modelName: string,
modelDescription: string,
modelNumber: string): Device {
const port = Math.random() > 0.5 ? 80 : 443;
return new Device(
address,
port,
macAddress,
friendlyName,
modelName,
modelDescription,
modelNumber,
`http://${address}:${port}/`);
}
}