New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@patrickkettner/get-cursor-position

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@patrickkettner/get-cursor-position

Get the cursor's current position in your terminal.

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

terminal

FAQs

Package last updated on 27 Jan 2017

Related posts