Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prompt-actions

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prompt-actions - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

13

index.js

@@ -24,3 +24,5 @@ 'use strict';

* Handle `number` keypress events. Toggles the choice at
* corresponding row, starting at `1` (1-based index).
* corresponding row, starting at `1`. Because of this (1-based index)
* we need to decrement the returned position by `1`, so that
* the "real" position is correct.
*

@@ -32,8 +34,11 @@ * @return {Number} Returns `choices.position`

Actions.prototype.number = function(pos, key) {
pos = key ? Number(key.value) : this.position(pos);
if (key && key.hasOwnProperty('value')) {
pos = Number(key.value);
}
pos = this.position(pos);
if (pos >= 0 && pos <= this.choices.length) {
this.position(--pos);
this.choices.position = pos - 1;
this.choices.radio();
}
return pos;
return pos - 1;
};

@@ -40,0 +45,0 @@

{
"name": "prompt-actions",
"description": "Action manager for prompt-base.",
"version": "1.1.0",
"version": "1.1.1",
"homepage": "https://github.com/enquirer/prompt-actions",

@@ -23,10 +23,10 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"devDependencies": {
"mocha": "^3.4.1",
"is-windows": "^1.0.1",
"prompt-choices": "^2.0.0",
"gulp": "^3.9.1",
"gulp-mocha": "^3.0.1",
"gulp-istanbul": "^1.1.1",
"gulp-eslint": "^3.0.1",
"gulp-format-md": "^0.1.12",
"gulp-istanbul": "^1.1.1",
"gulp-mocha": "^3.0.1",
"is-windows": "^1.0.1",
"mocha": "^3.4.1",
"prompt-choices": "^2.0.0"
"gulp-format-md": "^0.1.12"
},

@@ -33,0 +33,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc