fix(interface): clear on exit

This commit is contained in:
Mahdi Dibaiee
2016-03-15 16:50:15 +03:30
parent 200e6a7dd3
commit d3bd75a277
2 changed files with 10 additions and 2 deletions

View File

@ -34,7 +34,10 @@ export default class Interface {
return keys[value] === data;
});
if ( key === 'exit' ) process.exit();
if ( key === 'exit' ) {
this.output.write('\u001b[2J\u001b[0;0H');
process.exit();
}
let match = listeners.filter(listener => {
return listener.key === key || listener.key === data;