prompt-choices
Advanced tools
Comparing version 0.5.1 to 0.5.2
19
index.js
@@ -357,4 +357,4 @@ 'use strict'; | ||
/** | ||
* Getter for getting the length of the collection. | ||
* @name .length | ||
* Getter for getting the checked choices from the collection. | ||
* @name .checked | ||
* @api public | ||
@@ -378,2 +378,8 @@ */ | ||
/** | ||
* Getter for getting the length of the collection. | ||
* @name .length | ||
* @api public | ||
*/ | ||
Object.defineProperty(Choices.prototype, 'length', { | ||
@@ -388,2 +394,6 @@ set: function() { | ||
/** | ||
* Getter for instantiating the `Move` utility class | ||
*/ | ||
Object.defineProperty(Choices.prototype, 'move', { | ||
@@ -394,4 +404,5 @@ set: function(move) { | ||
get: function() { | ||
if (this._move) return this._move; | ||
utils.define(this, '_move', new Move(this, this.options)); | ||
if (!this._move) { | ||
utils.define(this, '_move', new Move(this, this.options)); | ||
} | ||
return this._move; | ||
@@ -398,0 +409,0 @@ } |
@@ -126,6 +126,6 @@ 'use strict'; | ||
this._pointer = ' '; | ||
val += ` (${this.disabled})`; | ||
val += ' (' + this.disabled + ')'; | ||
} else if (this.disabled === true) { | ||
this._pointer = ' '; | ||
val += ` (Disabled)`; | ||
val += ' (Disabled)'; | ||
} | ||
@@ -132,0 +132,0 @@ return this.prefix + this.symbol + ' ' + this.format(val) + '\n'; |
{ | ||
"name": "prompt-choices", | ||
"description": "Create an array of multiple choice objects for use in prompts.", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"homepage": "https://github.com/enquirer/prompt-choices", | ||
@@ -92,10 +92,8 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"prompt-base", | ||
"prompt-radio", | ||
"prompt-checkbox", | ||
"prompt-question" | ||
] | ||
}, | ||
"reflinks": [ | ||
"verb", | ||
"verb-generate-readme" | ||
] | ||
} | ||
} | ||
} |
@@ -239,7 +239,11 @@ # prompt-choices [![NPM version](https://img.shields.io/npm/v/prompt-choices.svg?style=flat)](https://www.npmjs.com/package/prompt-choices) [![NPM monthly downloads](https://img.shields.io/npm/dm/prompt-choices.svg?style=flat)](https://npmjs.org/package/prompt-choices) [![NPM total downloads](https://img.shields.io/npm/dt/prompt-choices.svg?style=flat)](https://npmjs.org/package/prompt-choices) [![Linux Build Status](https://img.shields.io/travis/enquirer/prompt-choices.svg?style=flat&label=Travis)](https://travis-ci.org/enquirer/prompt-choices) | ||
### [.length](index.js#L362) | ||
### [.checked](index.js#L362) | ||
Getter for getting the checked choices from the collection. | ||
### [.length](index.js#L383) | ||
Getter for getting the length of the collection. | ||
### [.Separator](index.js#L408) | ||
### [.Separator](index.js#L419) | ||
@@ -269,3 +273,5 @@ Create a new `Separator` object. See [choices-separator](https://github.com/enquirer/choices-separator) for more details. | ||
* [prompt-base](https://www.npmjs.com/package/prompt-base): Base prompt module used for creating custom prompt types for Enquirer. | [homepage](https://github.com/enquirer/prompt-base "Base prompt module used for creating custom prompt types for Enquirer.") | ||
* [prompt-checkbox](https://www.npmjs.com/package/prompt-checkbox): Multiple-choice/checkbox prompt. Can be used standalone or with a prompt system like [Enquirer]. | [homepage](https://github.com/enquirer/prompt-checkbox "Multiple-choice/checkbox prompt. Can be used standalone or with a prompt system like [Enquirer].") | ||
* [prompt-question](https://www.npmjs.com/package/prompt-question): Question object, used by Enquirer and prompt plugins. | [homepage](https://github.com/enquirer/prompt-question "Question object, used by Enquirer and prompt plugins.") | ||
* [prompt-radio](https://www.npmjs.com/package/prompt-radio): Radio prompt. This prompt behaves like other radio-button interfaces, where only one choice is enabled… [more](https://github.com/enquirer/prompt-radio) | [homepage](https://github.com/enquirer/prompt-radio "Radio prompt. This prompt behaves like other radio-button interfaces, where only one choice is enabled whilst all others are disabled. Can be used as a standalone prompt, or with a prompt system like [Enquirer].") | ||
@@ -272,0 +278,0 @@ ### Contributing |
27204
596
312