examples/userlist/index.js
function render(list) {
	const blank = new Array(process.stdout.rows).fill('\n')
	console.log(blank)
	readline.cursorTo(process.stdout, 0, 0)
	readline.clearScreenDown(process.stdout)
	list.forEach( user => {
		console.log(`${chalk.hsl(color(user.name),100,50)(user.name)}: ${user.id}`)
	})


}
function render(list) {
	const blank = new Array(process.stdout.rows).fill('\n')
	console.log(blank)
	readline.cursorTo(process.stdout, 0, 0)
	readline.clearScreenDown(process.stdout)
	list.forEach( user => {
		console.log(`${chalk.hsl(color(user.name),100,50)(user.name)}: ${user.id}`)
	})


}
function render ( list ) { const blank = new Array ( process . stdout . rows ) . fill ( '\n' ) console . log ( blank ) readline . cursorTo ( process . stdout , 0 , 0 ) readline . clearScreenDown ( process . stdout ) list . forEach ( user => { console . log ( ` ${ chalk . hsl ( color ( user . name ) , 100 , 50 ) ( user . name ) } ${ user . id } ` ) } ) }
Render our list, replace the old console content with our newer content and place the relevant data in the relevant places.
@param {Array} list
Render our list replace the old console content with our newer content and place the relevant data in the relevant places .