Get the cursor's current position in your terminal.
$ npm install get-cursor-position --save
Async:
var getCursorPosition = require('get-cursor-position');
getCursorPosition.async(function(pos) {
console.log('row: ' + pos.row);
console.log('col: ' + pos.col);
});
Sync:
var getCursorPosition = require('get-cursor-position');
var pos = getCursorPosition.sync();
console.log('row: ' + pos.row);
console.log('col: ' + pos.col);
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.