get-cursor-position
Advanced tools
Comparing version 1.0.5 to 2.0.0
12
index.js
@@ -1,6 +0,6 @@ | ||
var pos = require('./build/Release/pos'); | ||
var tty = require('tty'); | ||
var tty = require('tty'); | ||
var pos = require('bindings')('pos'); | ||
var code = '\x1b[6n'; | ||
function raw(mode) { | ||
function setRawMode(mode) { | ||
if (process.stdin.setRawMode) { | ||
@@ -15,3 +15,3 @@ process.stdin.setRawMode(mode) | ||
if (process.platform === 'win32') { | ||
process.nextTick(function() { | ||
process.nextTick(function () { | ||
var position = pos.sync(); | ||
@@ -32,3 +32,3 @@ | ||
process.stdin.resume(); | ||
raw(true); | ||
setRawMode(true); | ||
@@ -47,3 +47,3 @@ process.stdin.once('data', function (b) { | ||
// cleanup and close stdin | ||
raw(false); | ||
setRawMode(false); | ||
process.stdin.pause(); | ||
@@ -50,0 +50,0 @@ }); |
{ | ||
"name": "get-cursor-position", | ||
"version": "1.0.5", | ||
"version": "2.0.0", | ||
"description": "Get the cursor's current position in your terminal.", | ||
@@ -22,2 +22,6 @@ "main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"bindings": "^1.5.0", | ||
"node-addon-api": "^5.0.0" | ||
}, | ||
"repository": { | ||
@@ -30,3 +34,7 @@ "type": "git", | ||
}, | ||
"homepage": "https://github.com/bubkoo/get-cursor-position" | ||
"homepage": "https://github.com/bubkoo/get-cursor-position", | ||
"publishConfig": { | ||
"access": "public", | ||
"registry": "https://registry.npmjs.org" | ||
} | ||
} |
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
7
9980
2
+ Addedbindings@^1.5.0
+ Addednode-addon-api@^5.0.0
+ Addedbindings@1.5.0(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addednode-addon-api@5.1.0(transitive)