Is there anyway to send keystrokes to the terminal in node?

In particular I would like to send

ctrl + l

to clear the terminal so each time I test my script the terminal is clean.

If you're on linux :

console.log('\033[2J');

If you're on Windows, I think this works : (sets the cursor at 0,0)

var util = require('util');
util.print("\u001b[2J\u001b[0;0H");