# question-store [![NPM version](https://img.shields.io/npm/v/question-store.svg?style=flat)](https://www.npmjs.com/package/question-store) [![NPM downloads](https://img.shields.io/npm/dm/question-store.svg?style=flat)](https://npmjs.org/package/question-store) [![Build Status](https://img.shields.io/travis/jonschlinkert/question-store.svg?style=flat)](https://travis-ci.org/jonschlinkert/question-store) Ask questions, persist the answers. Basic support for i18n and storing answers based on current working directory. ## Table of Contents - [Install](#install) - [Usage](#usage) - [API](#api) - [About](#about) * [Related projects](#related-projects) * [Contributing](#contributing) * [Building docs](#building-docs) * [Running tests](#running-tests) * [Author](#author) * [License](#license) _(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ ## Install Install with [npm](https://www.npmjs.com/): ```sh $ npm install --save question-store ``` Inherits [question-cache](https://github.com/jonschlinkert/question-cache) and persists answers to disk. Answers are stored based on current working directory. ## Usage ```js var QuestionStore = require('question-store'); ``` ## API ### [QuestionsStore](index.js#L28) Create an instance of `QuestionsStore` with the given `options`. **Params** * `options` **{Object}**: question store options **Example** ```js var QuestionsStore = new QuestionsStore(options); ``` ### [.createStores](index.js#L53) Create stores for persisting data across sessions. * `globals`: Persist non-project-specific answers when `question.options.global` is true * `store`: Persist project-specific answers * `hints`: Persist project-specific hints. This is used to populate the `question.default` value. **Params** * `options` **{Object}** * `returns` **{Object}** ## About ### Related projects * [answer-store](https://www.npmjs.com/package/answer-store): Store answers to user prompts, based on locale and/or current working directory. | [homepage](https://github.com/jonschlinkert/answer-store "Store answers to user prompts, based on locale and/or current working directory.") * [base-questions](https://www.npmjs.com/package/base-questions): Plugin for base-methods that adds methods for prompting the user and storing the answers on… [more](https://github.com/node-base/base-questions) | [homepage](https://github.com/node-base/base-questions "Plugin for base-methods that adds methods for prompting the user and storing the answers on a project-by-project basis.") * [inquirer](https://www.npmjs.com/package/inquirer): A collection of common interactive command line user interfaces. | [homepage](https://github.com/sboudrias/Inquirer.js#readme "A collection of common interactive command line user interfaces.") * [question-cache](https://www.npmjs.com/package/question-cache): A wrapper around inquirer that makes it easy to create and selectively reuse questions. | [homepage](https://github.com/jonschlinkert/question-cache "A wrapper around inquirer that makes it easy to create and selectively reuse questions.") ### Contributing Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). ### Building docs _(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ To generate the readme and API documentation with [verb](https://github.com/verbose/verb): ```sh $ npm install -g verb verb-generate-readme && verb ``` ### Running tests Install dev dependencies: ```sh $ npm install -d && npm test ``` ### Author **Jon Schlinkert** * [github/jonschlinkert](https://github.com/jonschlinkert) * [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ### License Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). Released under the [MIT license](https://github.com/jonschlinkert/question-store/blob/master/LICENSE). *** _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 29, 2016._