prompt-actions
Advanced tools
Comparing version 2.0.0 to 2.0.1
10
index.js
@@ -33,6 +33,3 @@ 'use strict'; | ||
Actions.prototype.number = function(pos, key) { | ||
if (key && key.hasOwnProperty('value')) { | ||
pos = Number(key.value); | ||
} | ||
pos = this.position(pos); | ||
pos = this.position(pos, key); | ||
if (pos >= 0 && pos <= this.choices.length) { | ||
@@ -157,3 +154,6 @@ this.choices.position = pos - 1; | ||
Actions.prototype.position = function(pos) { | ||
Actions.prototype.position = function(pos, key) { | ||
if (key && key.name === 'number' && key.hasOwnProperty('value')) { | ||
pos = Number(key.value); | ||
} | ||
if (typeof pos === 'number') { | ||
@@ -160,0 +160,0 @@ if (pos >= 0 && pos <= this.choices.length) { |
{ | ||
"name": "prompt-actions", | ||
"description": "Action manager for prompt-base.", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"homepage": "https://github.com/enquirer/prompt-actions", | ||
@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", |
@@ -76,2 +76,2 @@ # prompt-actions [![NPM version](https://img.shields.io/npm/v/prompt-actions.svg?style=flat)](https://www.npmjs.com/package/prompt-actions) [![NPM monthly downloads](https://img.shields.io/npm/dm/prompt-actions.svg?style=flat)](https://npmjs.org/package/prompt-actions) [![NPM total downloads](https://img.shields.io/npm/dt/prompt-actions.svg?style=flat)](https://npmjs.org/package/prompt-actions) [![Linux Build Status](https://img.shields.io/travis/enquirer/prompt-actions.svg?style=flat&label=Travis)](https://travis-ci.org/enquirer/prompt-actions) | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 21, 2017._ | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 23, 2017._ |
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
10095