get-cursor-position

2.0.0 • Public • Published

get-cursor-position

Get the cursor's current position in your terminal.

MIT License Package Quality

Install

$ npm install get-cursor-position --save

Usage

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);

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.

Package Sidebar

Install

npm i get-cursor-position

Weekly Downloads

160

Version

2.0.0

License

MIT

Unpacked Size

9.98 kB

Total Files

7

Last publish

Collaborators

  • bubkoo