prompt-choices
Advanced tools
Comparing version 0.1.0 to 0.1.1
10
index.js
@@ -80,2 +80,12 @@ 'use strict'; | ||
/** | ||
* Toggle the choice at the given `idx`. | ||
* @param {Number} `idx` The index of the choice to toggle. | ||
*/ | ||
Choices.prototype.toggle = function(idx) { | ||
var checked = this.getChoice(idx).checked; | ||
this.getChoice(idx).checked = !checked; | ||
}; | ||
/** | ||
* Match the valid choices against a where clause | ||
@@ -82,0 +92,0 @@ * @param {Object} whereClause Lodash `where` clause |
{ | ||
"name": "prompt-choices", | ||
"description": "Create an array of multiple choice objects for use in prompts.", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"homepage": "https://github.com/enquirer/prompt-choices", | ||
@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", |
# prompt-choices [![NPM version](https://img.shields.io/npm/v/prompt-choices.svg?style=flat)](https://www.npmjs.com/package/prompt-choices) [![NPM downloads](https://img.shields.io/npm/dm/prompt-choices.svg?style=flat)](https://npmjs.org/package/prompt-choices) | ||
Create an array of multiple choice objects for use in prompts. | ||
> Create an array of multiple choice objects for use in prompts. | ||
@@ -62,2 +62,2 @@ ## Install | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on August 28, 2016._ | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on August 29, 2016._ |
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
11220
239