
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
Async helper that prompts the user for a value and uses the answer as context for rendering the template.
Async helper that prompts the user for a value and uses the answer as context for rendering the template.
Install with npm:
$ npm install --save helper-ask
This helper can be used with the following applications:
This helper requires the base-questions plugin to be registered first. Uses the ask-when library to conditionally prompt the user. See that project for available options and additional API documentation.
var ask = require('helper-ask');
var questions = require('base-questions');
var templates = require('templates');
var app = templates();
app.use(questions());
// register the helper, make sure to pass `app` to the function
app.asyncHelper('ask', ask(app));
Example
If you're using templates directly, you'll need to create a collection and add a template engine.
app.create('pages');
app.engine('*', require('engine-base'));
app.option('engine', '*');
With the other apps you should be able to do the following:
var page = app.page('foo', {content: '<%= ask("name") %>'});
app.option('askWhen', 'not-answered');
app.data('name', 'Brian');
app.render(page, function(err, view) {
if (err) return cb(err);
console.log(view.contents.toString());
//=> 'Brian'
cb();
});
Params
app {Object}returns {Function}: Returns the helper functionExample
<%= ask('author.name') %>
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb-generate-readme, v0.1.31, on October 01, 2016.
FAQs
Async helper that prompts the user for a value and uses the answer as context for rendering the template.
The npm package helper-ask receives a total of 2,009 weekly downloads. As such, helper-ask popularity was classified as popular.
We found that helper-ask demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.