get-cursor-position
Advanced tools
Comparing version 1.0.2 to 1.0.3
14
index.js
@@ -16,3 +16,17 @@ var pos = require('./build/Release/pos'); | ||
pos.async = function (callback, context) { | ||
if (process.platform === 'win32') { | ||
process.nextTick(function() { | ||
var position = pos.sync(); | ||
if (position) { | ||
callback && callback.call(context, { | ||
row: position.row, | ||
col: position.col | ||
}); | ||
} | ||
}); | ||
return; | ||
} | ||
// start listening | ||
@@ -19,0 +33,0 @@ process.stdin.resume(); |
{ | ||
"name": "get-cursor-position", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Get the cursor's current position in your terminal.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,5 +6,4 @@ # get-cursor-position | ||
[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/bubkoo/get-cursor-position/blob/master/LICENSE) | ||
[![npm:](https://img.shields.io/npm/v/get-cursor-position.svg?style=flat-square)](https://www.npmjs.com/packages/get-cursor-position) | ||
[![Package Quality](http://npm.packagequality.com/shield/get-cursor-position.svg)](http://packagequality.com/#?package=get-cursor-position) | ||
## Install | ||
@@ -11,0 +10,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10085
43
43