Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ansiEscapes.cursorMove(xOffset + 16, 0) +
'Max: ' + getFormattedTemp(weather.max_temp) +
ansiEscapes.cursorNextLine +
// Min temp
ansiEscapes.cursorMove(xOffset + 16, 0) +
'Min: ' + getFormattedTemp(weather.min_temp) +
ansiEscapes.cursorNextLine +
// Wind
ansiEscapes.cursorMove(xOffset + 16, 0) +
getFormattedWind(weather.wind_direction_compass, weather.wind_speed) +
ansiEscapes.cursorNextLine +
// Humidity
ansiEscapes.cursorMove(xOffset + 16, 0) +
'Humidity: ' + weather.humidity + '%' +
ansiEscapes.cursorNextLine +
(column !== 2 ? ansiEscapes.cursorUp(7) : ansiEscapes.cursorDown(1))
)
}
exports.down = function(rl, x) {
rl.output.write(ansiEscapes.cursorDown(x));
};
function update() {
var output = task.render();
var change = currentLine - task.line;
out.write(position.cursorUp(change));
out.write(output);
out.write(position.cursorDown(change - (out.height(output) - 1)));
out.write(position.cursorBackward(out.ln(output)));
return task;
}
function printBoard(floorMap, warriorStatus, offset) {
if (offset > 0) {
const floorMapRows = floorMap.length;
print(ansiEscapes.cursorUp(offset + floorMapRows + warriorStatusRows));
}
printWarriorStatus(warriorStatus);
printFloorMap(floorMap);
if (offset > 0) {
print(ansiEscapes.cursorDown(offset));
}
}
} else {
coloredStage = chalk.yellow(stage)
}
cli.write(
`${ansiEscapes.cursorHide +
ansiEscapes.cursorLeft +
ansiEscapes.eraseDown}\n ${chalk.grey(
`${second}s ${figures.pointerSmall}`
)} ${coloredStage} ${chalk.grey(figures.pointerSmall)} ${componentName} ${chalk.grey(
figures.pointerSmall
)} ${chalk.yellow(cli.msg)}\n${ansiEscapes.cursorLeft + ansiEscapes.cursorUp(2)}`
)
if (!cli.running) {
cli.write(
`${ansiEscapes.cursorShow + ansiEscapes.cursorLeft + ansiEscapes.cursorDown(2)}\n`
)
return
}
await sleep(100)
cli.render(nextFrame)
},
write: process.stdout.write.bind(process.stdout)