5.7.1 Java  Script Types loader.mjs Accounts Contracts Network Utilities Utilities ask.mjs
On this page:
done ask.mjs

The Reach JavaScript standard library also provides the helper module @reach-sh/stdlib/ask.mjs for constructing console interfaces to your frontends.

import * as ask from '@reach-sh/stdlib/ask.mjs';

It provides the following exports:

ask(string, (string => result)) => Promise<result>
yesno(string) => boolean
done() => null

ask is an asynchronous function that asks a question on the console and returns a Promise for the first result that its second argument does not error on.

yesno is an argument appropriate to give as the second argument to ask that parses "Yes"/"No" answers.

done indicates that no more questions will be asked.