index.js
function Ask(options) {
  if (!(this instanceof Ask)) {
    return new Ask(options);
  }

  this.options = options || {};
  this.questions = utils.questions(this.options.questions);

  var store = this.options.store;
  var name = store && store.name;
  if (!name) name = 'ask-once.' + utils.project(process.cwd());

  this.answers = utils.store(name, store);
  this.previous = utils.store(name + '.previous', this.answers.options);

  Object.defineProperty(this, 'data', {
    enumerable: true,
    get: function () {
      return this.answers.data;
    }
  });
}
function Ask(options) {
  if (!(this instanceof Ask)) {
    return new Ask(options);
  }

  this.options = options || {};
  this.questions = utils.questions(this.options.questions);

  var store = this.options.store;
  var name = store && store.name;
  if (!name) name = 'ask-once.' + utils.project(process.cwd());

  this.answers = utils.store(name, store);
  this.previous = utils.store(name + '.previous', this.answers.options);

  Object.defineProperty(this, 'data', {
    enumerable: true,
    get: function () {
      return this.answers.data;
    }
  });
}
function Ask ( options ) { if ( ! ( this instanceof Ask ) ) { return new Ask ( options ) ; } this . options = options || { } ; this . questions = utils . questions ( this . options . questions ) ; var store = this . options . store ; var name = store && store . name ; if ( ! name ) name = 'ask-once.' + utils . project ( process . cwd ( ) ) ; this . answers = utils . store ( name , store ) ; this . previous = utils . store ( name + '.previous' , this . answers . options ) ; Object . defineProperty ( this , 'data' , { enumerable : true , get : function ( ) { return this . answers . data ; } } ) ; }
Returns a question-asking function that only asks a question
if the answer is not already stored, or if forced.

```js
var ask = new Ask({questions: questions});
```

@param {Object} `options`
@param {Object} `options.questions` (optional) Options to be passed to [question-cache][]
@param {Object} `options.store` (optional) Options to be passed to [data-store][]
@api public
Returns a question - asking function that only asks a question if the answer is not already stored or if forced .