Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function prettifySize(size, isLarge) {
let res = filesize(size);
if (isLarge) {
return logger.chalk.yellow(logger.emoji.warning + ' ' + res);
}
return logger.chalk.magenta(res);
}
function prettifySize(size, isLarge) {
let res = filesize(size);
if (isLarge) {
return logger.chalk.yellow(logger.emoji.warning + ' ' + res);
}
return logger.chalk.magenta(res);
}
server.once('listening', () => {
let addon =
server.address().port !== port
? `- ${logger.chalk.yellow(
`configured port ${port} could not be used.`,
)}`
: '';
logger.persistent(
`Server running at ${logger.chalk.cyan(
`${useHTTPS ? 'https' : 'http'}://${host || 'localhost'}:${
server.address().port
}`,
)} ${addon}`,
);
resolve(server);
});
});