{"_id":"helper-ask","_rev":"8-c6db057ba7ce696029d832f30ef467e5","name":"helper-ask","description":"Async helper that prompts the user for a value and uses the answer as context for rendering the template.","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.1":{"name":"helper-ask","description":"Async helper that prompts the user for a value and uses the answer as context for rendering the template.","version":"0.1.1","homepage":"https://github.com/helpers/helper-ask","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/helpers/helper-ask.git"},"bugs":{"url":"https://github.com/jonschlinkert/helper-ask/issues"},"license":"MIT","files":["index.js","LICENSE"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"ask-when":"^0.1.1","get-value":"^2.0.6","isobject":"^2.1.0","mixin-deep":"^1.1.3"},"devDependencies":{"base-questions":"^0.6.6","engine-base":"^0.1.2","gulp-format-md":"^0.1.9","mocha":"^2.5.3","templates":"^0.23.0"},"keywords":["answer","ask","cli","context","helper","helpers","interaction","prompt","question","render","template","templates","terminal"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["handlebars-helpers","template-helpers"]},"lint":{"reflinks":true},"reflinks":["assemble","generate","helpers","templates","update","verb","base-questions","ask-when","verb-readme-generator"]},"gitHead":"e948e1d18009fc2339af3ed7c76e055c142ca66e","_id":"helper-ask@0.1.1","_shasum":"58c6a44e5a2e477df37a061acf10de790841a9b5","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"58c6a44e5a2e477df37a061acf10de790841a9b5","tarball":"https://registry.npmjs.org/helper-ask/-/helper-ask-0.1.1.tgz","integrity":"sha512-O/cGoHMgUX8QbldPSEvuHvs6O/JK3C630jo1hsXJDS7JVKFb9SNM3juSnN19vUd9aPXsH6dmMbQhlZ395vO5+g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHu55vSbiNTlIL/b6/Wi6LRvIB1DrQ/MMc5Ncgele4NaAiBgdRRzP+fm43PvoEusgwOObCys0EJ6cK9Ey2rrbqSmRQ=="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/helper-ask-0.1.1.tgz_1467387383267_0.4114069913048297"}},"0.1.2":{"name":"helper-ask","description":"Async helper that prompts the user for a value and uses the answer as context for rendering the template.","version":"0.1.2","homepage":"https://github.com/helpers/helper-ask","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/helpers/helper-ask.git"},"bugs":{"url":"https://github.com/jonschlinkert/helper-ask/issues"},"license":"MIT","files":["index.js","LICENSE"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"ask-when":"^0.1.1","get-value":"^2.0.6","isobject":"^2.1.0","mixin-deep":"^1.1.3"},"devDependencies":{"base-questions":"^0.6.6","engine-base":"^0.1.2","gulp-format-md":"^0.1.9","mocha":"^2.5.3","templates":"^0.23.0"},"keywords":["answer","ask","cli","context","helper","helpers","interaction","prompt","question","render","template","templates","terminal"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["handlebars-helpers","template-helpers"]},"lint":{"reflinks":true},"reflinks":["assemble","generate","helpers","templates","update","verb","base-questions","ask-when","verb-readme-generator"]},"gitHead":"4a922a8c760fe9367dd057191b8a0356d6d141b6","_id":"helper-ask@0.1.2","_shasum":"6c67a1fcf9f435dfa2934ff3d2dc355615c82b51","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"6c67a1fcf9f435dfa2934ff3d2dc355615c82b51","tarball":"https://registry.npmjs.org/helper-ask/-/helper-ask-0.1.2.tgz","integrity":"sha512-B4G5hFAIwrZQnrSv0AqY6yMeh5s8T6KPn9B/EUF1jNdA2PsfJdtZ6jfLmkY1UGNetG916z2YrggreXaFANHDog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPHM1PJIak+qGg9aVWlJXIpG6+BOfxDkNeNlnlMWNIFgIgOGVoOrkAOzuVlvtQ32ACEcsV/FX8P1GrFaWV94mulWg="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/helper-ask-0.1.2.tgz_1468198790481_0.4985368703491986"}},"0.1.3":{"name":"helper-ask","description":"Async helper that prompts the user for a value and uses the answer as context for rendering the template.","version":"0.1.3","homepage":"https://github.com/helpers/helper-ask","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/helpers/helper-ask.git"},"bugs":{"url":"https://github.com/jonschlinkert/helper-ask/issues"},"license":"MIT","files":["index.js","LICENSE"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"ask-when":"^0.1.1","get-value":"^2.0.6","isobject":"^2.1.0","mixin-deep":"^1.1.3"},"devDependencies":{"base-questions":"^0.6.6","engine-base":"^0.1.2","gulp-format-md":"^0.1.9","mocha":"^2.5.3","templates":"^0.23.0"},"keywords":["answer","ask","cli","context","helper","helpers","interaction","prompt","question","render","template","templates","terminal"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["handlebars-helpers","template-helpers"]},"lint":{"reflinks":true},"reflinks":["assemble","generate","helpers","templates","update","verb","base-questions","ask-when","verb-readme-generator"]},"gitHead":"a21ba679d2e28da86b601b506f027c0d138162d6","_id":"helper-ask@0.1.3","_shasum":"fba77d152b455902330daecbdc502acde97b5dc3","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"fba77d152b455902330daecbdc502acde97b5dc3","tarball":"https://registry.npmjs.org/helper-ask/-/helper-ask-0.1.3.tgz","integrity":"sha512-qNUqYhXH8lRobvomndkad3RaijtBRgWmYilVj2oPUaIVqXRW/gZAART+znN6pS8zUXOq16PZDZDrVvCoAmD8oA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCS04PXSwfgzb6HlFSRkndU2ogDgICtXkdHXfty/nVU7QIhAIAL3Dry+tKb1mIZc1L0ipTLsT3LpAqmQaALvjUNfl6t"}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/helper-ask-0.1.3.tgz_1468450609395_0.4662566063925624"}},"0.1.4":{"name":"helper-ask","description":"Async helper that prompts the user for a value and uses the answer as context for rendering the template.","version":"0.1.4","homepage":"https://github.com/helpers/helper-ask","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/helpers/helper-ask.git"},"bugs":{"url":"https://github.com/jonschlinkert/helper-ask/issues"},"license":"MIT","files":["index.js","LICENSE"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"ask-when":"^0.1.4","get-value":"^2.0.6","isobject":"^2.1.0","mixin-deep":"^1.1.3"},"devDependencies":{"base-questions":"^0.7.1","engine-base":"^0.1.2","gulp-format-md":"^0.1.9","mocha":"^2.5.3","templates":"^0.24.2"},"keywords":["answer","ask","cli","context","helper","helpers","interaction","prompt","question","render","template","templates","terminal"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["handlebars-helpers","template-helpers"]},"lint":{"reflinks":true},"reflinks":["assemble","generate","helpers","templates","update","verb","base-questions","ask-when","verb-readme-generator"]},"gitHead":"18243fb9034fe125993142926920f36ca8670626","_id":"helper-ask@0.1.4","_shasum":"e799146e86eeff0b51328b9f00b913caf9f1441d","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"e799146e86eeff0b51328b9f00b913caf9f1441d","tarball":"https://registry.npmjs.org/helper-ask/-/helper-ask-0.1.4.tgz","integrity":"sha512-B/jOkQRK5V0kroKSZ0feUPs+yR0AtxRHvEta2+i6haZeL6kMZYr15aImtcJIyhIurUhBUHderEFagAzlnji4rQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCW4FsuPmP4PM4Hx3cfxb9/jpXuUXRNC74SpL9TTiFa8gIgYtK6tReK7QtyD5e87m2rX5DxOdVjO7e1WAvQZtRBxbk="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/helper-ask-0.1.4.tgz_1468457852882_0.35075652971863747"}},"0.2.0":{"name":"helper-ask","description":"Async helper that prompts the user for a value and uses the answer as context for rendering the template.","version":"0.2.0","homepage":"https://github.com/helpers/helper-ask","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/helpers/helper-ask.git"},"bugs":{"url":"https://github.com/helpers/helper-ask/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"ask-when":"^0.1.4","debug":"^2.2.0","get-value":"^2.0.6","has-value":"^0.3.1","isobject":"^2.1.0","mixin-deep":"^1.1.3"},"devDependencies":{"base-questions":"^0.7.1","engine-base":"^0.1.2","gulp-format-md":"^0.1.9","mocha":"^2.5.3","templates":"^0.24.2"},"keywords":["answer","ask","cli","context","helper","helpers","interaction","prompt","question","render","template","templates","terminal"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["handlebars-helpers","template-helpers"]},"lint":{"reflinks":true},"reflinks":["ask-when","assemble","base-questions","generate","templates","update","verb","verb-generate-readme"]},"gitHead":"72cf3e0c977235bd521fbb3236e617191d7fbaf9","_id":"helper-ask@0.2.0","_shasum":"a83ed1a4d184f113e5e5bf24925db246a6f8e7e6","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"a83ed1a4d184f113e5e5bf24925db246a6f8e7e6","tarball":"https://registry.npmjs.org/helper-ask/-/helper-ask-0.2.0.tgz","integrity":"sha512-1dsXbzI+GNoI2k/vECOVnCsPU05xSKXnSrunAQDKEdtLX/P7Fabqb3Ga77k1VCtrxi13r8TH3EMEokDycvKYvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICN++roT1qgBP3xjF/PDO+F4fjB83eHms+Iem6NS6WWOAiB8unx4Za3h2DXLYreF8vGlf9Th/ENxvzfA1Ly6INtTHg=="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/helper-ask-0.2.0.tgz_1475315663713_0.3006467467639595"}},"0.2.1":{"name":"helper-ask","description":"Async helper that prompts the user for a value and uses the answer as context for rendering the template.","version":"0.2.1","homepage":"https://github.com/helpers/helper-ask","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/helpers/helper-ask.git"},"bugs":{"url":"https://github.com/helpers/helper-ask/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"ask-when":"^0.1.7","debug":"^2.2.0","get-value":"^2.0.6","has-value":"^0.3.1","isobject":"^2.1.0","mixin-deep":"^1.1.3"},"devDependencies":{"base-questions":"^0.7.1","engine-base":"^0.1.2","gulp-format-md":"^0.1.9","mocha":"^2.5.3","templates":"^0.24.2"},"keywords":["answer","ask","cli","context","helper","helpers","interaction","prompt","question","render","template","templates","terminal"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["handlebars-helpers","template-helpers"]},"lint":{"reflinks":true},"reflinks":["ask-when","assemble","base-questions","generate","templates","update","verb","verb-generate-readme"]},"gitHead":"63864b5d8dd04ef1737a64cb8bf208cf80ae44f0","_id":"helper-ask@0.2.1","_shasum":"e5aca1e8d0587fc1159bbc6cf70c522537ffcf8c","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"e5aca1e8d0587fc1159bbc6cf70c522537ffcf8c","tarball":"https://registry.npmjs.org/helper-ask/-/helper-ask-0.2.1.tgz","integrity":"sha512-SKyDeqYdIlWSGmxHKyjfiUfBi9pLlFl2REYsi33Oa0axihl5gMQFUWkDS4PmFQcvh0nfrU6DmZlEp0yhcUguyw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClcR9348KEhX7acdaWOPkpy/eV3G4ZLSly9y1TMhANHQIhAJnFYQQaCtoC2vJsLKaKVd4VlILR/phtGmOJqkncNhBN"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/helper-ask-0.2.1.tgz_1475315821626_0.7516440919134766"}}},"readme":"# helper-ask [![NPM version](https://img.shields.io/npm/v/helper-ask.svg?style=flat)](https://www.npmjs.com/package/helper-ask) [![NPM downloads](https://img.shields.io/npm/dm/helper-ask.svg?style=flat)](https://npmjs.org/package/helper-ask) [![Build Status](https://img.shields.io/travis/helpers/helper-ask.svg?style=flat)](https://travis-ci.org/helpers/helper-ask)\n\n> Async helper that prompts the user for a value and uses the answer as context for rendering the template.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save helper-ask\n```\n\n## Compatibility\n\nThis helper can be used with the following applications:\n\n* [assemble](https://github.com/assemble/assemble)\n* [verb](https://github.com/verbose/verb)\n* [update](https://github.com/update/update)\n* [generate](https://github.com/generate/generate)\n* [templates](https://github.com/jonschlinkert/templates)\n\n## Usage\n\nThis helper requires the [base-questions](https://github.com/node-base/base-questions) plugin to be registered first. Uses the [ask-when](https://github.com/jonschlinkert/ask-when) library to conditionally prompt the user. See that project for available options and additional API documentation.\n\n```js\nvar ask = require('helper-ask');\nvar questions = require('base-questions');\nvar templates = require('templates');\nvar app = templates();\n\napp.use(questions());\n\n// register the helper, make sure to pass `app` to the function\napp.asyncHelper('ask', ask(app));\n```\n\n**Example**\n\nIf you're using [templates](https://github.com/jonschlinkert/templates) directly, you'll need to create a collection and add a template engine.\n\n```js\napp.create('pages');\napp.engine('*', require('engine-base'));\napp.option('engine', '*');\n```\n\nWith the other apps you should be able to do the following:\n\n```js\nvar page = app.page('foo', {content: '<%= ask(\"name\") %>'});\napp.option('askWhen', 'not-answered');\napp.data('name', 'Brian');\n\napp.render(page, function(err, view) {\n  if (err) return cb(err);\n  console.log(view.contents.toString());\n  //=> 'Brian'\n  cb();\n});\n```\n\n## API\n\n**Params**\n\n* `app` **{Object}**\n* `returns` **{Function}**: Returns the helper function\n\n**Example**\n\n```html\n<%= ask('author.name') %>\n```\n\n## About\n\n### Related projects\n\n* [handlebars-helpers](https://www.npmjs.com/package/handlebars-helpers): More than 130 Handlebars helpers in ~20 categories. Helpers can be used with Assemble, Generate… [more](https://github.com/assemble/handlebars-helpers) | [homepage](https://github.com/assemble/handlebars-helpers \"More than 130 Handlebars helpers in ~20 categories. Helpers can be used with Assemble, Generate, Verb, Ghost, gulp-handlebars, grunt-handlebars, consolidate, or any node.js/Handlebars project.\")\n* [template-helpers](https://www.npmjs.com/package/template-helpers): Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or… [more](https://github.com/jonschlinkert/template-helpers) | [homepage](https://github.com/jonschlinkert/template-helpers \"Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or any engine that supports helper functions.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(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).)_\n\nTo generate the readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install -g verb verb-generate-readme && verb\n```\n\n### Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/helpers/helper-ask/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 01, 2016._","maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2022-06-18T20:07:27.673Z","created":"2016-07-01T15:36:25.311Z","0.1.1":"2016-07-01T15:36:25.311Z","0.1.2":"2016-07-11T00:59:53.197Z","0.1.3":"2016-07-13T22:56:51.411Z","0.1.4":"2016-07-14T00:57:34.907Z","0.2.0":"2016-10-01T09:54:24.937Z","0.2.1":"2016-10-01T09:57:03.138Z"},"homepage":"https://github.com/helpers/helper-ask","keywords":["answer","ask","cli","context","helper","helpers","interaction","prompt","question","render","template","templates","terminal"],"repository":{"type":"git","url":"git+https://github.com/helpers/helper-ask.git"},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"bugs":{"url":"https://github.com/helpers/helper-ask/issues"},"license":"MIT","readmeFilename":"README.md"}