{"id":19475479,"url":"https://github.com/artdecocode/reloquent","last_synced_at":"2026-06-10T16:31:36.976Z","repository":{"id":57352892,"uuid":"92218457","full_name":"artdecocode/reloquent","owner":"artdecocode","description":"Readline query with timeout for Node.js","archived":false,"fork":false,"pushed_at":"2020-02-22T23:18:41.000Z","size":184,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-04T12:14:43.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.artd.eco","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artdecocode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-23T20:42:46.000Z","updated_at":"2020-02-22T23:18:43.000Z","dependencies_parsed_at":"2022-09-05T11:41:24.282Z","dependency_job_id":null,"html_url":"https://github.com/artdecocode/reloquent","commit_stats":null,"previous_names":["sobesednik/reloquent"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/artdecocode/reloquent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Freloquent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Freloquent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Freloquent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Freloquent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artdecocode","download_url":"https://codeload.github.com/artdecocode/reloquent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Freloquent/sbom","scorecard":{"id":208910,"data":{"date":"2025-08-11","repo":{"name":"github.com/artdecocode/reloquent","commit":"6b1e48e8c10687cad157ff6b11a59b1b00a78b02"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T00:21:21.187Z","repository_id":57352892,"created_at":"2025-08-17T00:21:21.187Z","updated_at":"2025-08-17T00:21:21.187Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34161283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T19:33:06.329Z","updated_at":"2026-06-10T16:31:36.943Z","avatar_url":"https://github.com/artdecocode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reloquent\n\n[![npm version](https://badge.fury.io/js/reloquent.svg)](https://www.npmjs.com/package/reloquent)\n[![Build status](https://ci.appveyor.com/api/projects/status/9bkgy77h7arflx24?svg=true)](https://ci.appveyor.com/project/4r7d3c0/reloquent)\n\n_Reloquent_ allows to ask users a question, a confirmation (y/n), or a series of questions via the read-line interface. \n\n```sh\nyarn add reloquent\nnpm i reloquent\n```\n\n## Table Of Contents\n\n- [Table Of Contents](#table-of-contents)\n- [API](#api)\n- [`Question` Type](#question-type)\n  * [\u003cstrong\u003e\u003ccode\u003etext*\u003c/code\u003e\u003c/strong\u003e](#text)\n  * [\u003ccode\u003evalidation\u003c/code\u003e](#validation)\n  * [\u003ccode\u003epostProcess\u003c/code\u003e](#postprocess)\n  * [\u003ccode\u003edefaultValue\u003c/code\u003e](#defaultvalue)\n  * [\u003ccode\u003egetDefault\u003c/code\u003e](#getdefault)\n  * [\u003ccode\u003epassword\u003c/code\u003e](#password)\n  * [\u003ccode\u003eQuestion\u003c/code\u003e](#type-question)\n- [`async askSingle(question: (string|!Question), timeout=: number): string`](#async-asksinglequestion-stringquestiontimeout-number-string)\n- [`async askQuestions(questions: !Questions, timeout=: number): !Object\u003cstring, string\u003e`](#async-askquestionsquestions-questionstimeout-number-objectstring-string)\n  * [`Questions`](#type-questions)\n- [`async confirm(question: (string|!Question), options=: !ConfirmOptions): boolean`](#async-confirmquestion-stringquestionoptions-confirmoptions-boolean)\n  * [`ConfirmOptions`](#type-confirmoptions)\n- [Copyright](#copyright)\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/0.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n\n\n## API\n\nThere are 4 types of calls to the API:\n\n- ask a single question as a string;\n- ask a single question as an object;\n- ask multiple questions.\n- ask for a confirmation;\n\nTheir respective methods can be accessed via the `import` statement:\n\n```js\nimport ask, { askSingle, confirm } from 'reloquent'\n```\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/1.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## `Question` Type\n\nWhen asking a question which is not a string, the `question` object should have the following structure:\n\n\u003ctable\u003e\n \u003cthead\u003e\n  \u003ctr\u003e\n   \u003cth\u003eProperty\u003c/th\u003e\n   \u003cth\u003eType\u003c/th\u003e\n   \u003cth\u003eDescription\u003c/th\u003e\n   \u003cth\u003eExample\u003c/th\u003e\n  \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e\u003ca name=\"text\"\u003e\u003cstrong\u003e\u003ccode\u003etext*\u003c/code\u003e\u003c/strong\u003e\u003c/a\u003e\u003c/td\u003e\n   \u003ctd\u003e\u003cem\u003estring\u003c/em\u003e\u003c/td\u003e\n   \u003ctd\u003eDisplay text. Required.\u003c/td\u003e\n   \u003ctd\u003e\n\n```js\nconst q = {\n  text: 'What is your name',\n}\n```\n  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e\u003ca name=\"validation\"\u003e\u003ccode\u003evalidation\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n   \u003ctd\u003e\u003cem\u003e(async) function\u003c/em\u003e\u003c/td\u003e\n   \u003ctd\u003eA function which needs to throw an error if validation does not pass.\u003c/td\u003e\n   \u003ctd\u003e\n\n```js\nconst q = {\n  text: 'What is your name',\n  validate(v) {\n    if (!v.length) {\n      throw new Error('Name required.')\n    }\n  },\n}\n```\n  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e\u003ca name=\"postprocess\"\u003e\u003ccode\u003epostProcess\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n   \u003ctd\u003e\u003cem\u003e(async) function\u003c/em\u003e\u003c/td\u003e\n   \u003ctd\u003eA function to transform the answer.\u003c/td\u003e\n   \u003ctd\u003e\n\n```js\nconst q = {\n  text: 'What is your name',\n  postProcess(v) {\n    return `${v.toLowerCase()}`\n  },\n}\n```\n  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e\u003ca name=\"defaultvalue\"\u003e\u003ccode\u003edefaultValue\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n   \u003ctd\u003e\u003cem\u003estring\u003c/em\u003e\u003c/td\u003e\n   \u003ctd\u003e\n\nDefault answer (shown to users in `[default]` brackets).\u003c/td\u003e\n   \u003ctd\u003e\n\n```js\nconst q = {\n  text: 'What is your name',\n  defaultValue: 'Visitor',\n}\n```\n  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e\u003ca name=\"getdefault\"\u003e\u003ccode\u003egetDefault\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n   \u003ctd\u003e\u003cem\u003e(async) function\u003c/em\u003e\u003c/td\u003e\n   \u003ctd\u003eA function to execute to obtain the default value.\u003c/td\u003e\n   \u003ctd\u003e\n\n```js\nconst q = {\n  text: 'What is your name',\n  async getDefault() {\n    await git('config', 'user.name')\n  },\n}\n```\n  \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e\u003ca name=\"password\"\u003e\u003ccode\u003epassword\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n   \u003ctd\u003e\u003cem\u003eboolean\u003c/em\u003e\u003c/td\u003e\n   \u003ctd\u003eHide the inputs behind \u003ccode\u003e*\u003c/code\u003e when typing the answer.\u003c/td\u003e\n   \u003ctd\u003e\n\n```js\nconst q = {\n  text: 'Please enter the password',\n  password: true,\n}\n```\n  \u003c/td\u003e\n  \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\n\nIf both `defaultValue` and `getDefault` are provided, the result of the `getDefault` takes precedence:\n\n```js\nconst q = {\n  defaultValue: 'I desire it much',\n  getDefault() {\n    return 'I desire it much so'\n  },\n}\n```\n\n![getDefault will get precedence](doc/precedence.gif)\n\nWhen the `password` property is set to true, the answer will be hidden behind the `*` symbols.\n\n```js\nimport { askSingle  } from 'reloquent'\n\nconst Password = async () =\u003e {\n  const res = await askSingle({\n    text: 'Please enter the password',\n    password: true,\n  })\n  return res\n}\n```\n```\nPlease enter the password: ********\n```\n\n\u003cdetails\u003e\n \u003csummary\u003e\u003cstrong\u003e\u003ca name=\"type-question\"\u003e\u003ccode\u003eQuestion\u003c/code\u003e\u003c/a\u003e extends \u003ca href=\"#type-readlinereadlineoptions\"\u003e\u003ccode\u003ereadline.ReadLineOptions\u003c/code\u003e\u003c/a\u003e\u003c/strong\u003e: A question.\u003c/summary\u003e\n\n|     Name     |                              Type                               |                               Description                               | Default |\n| ------------ | --------------------------------------------------------------- | ----------------------------------------------------------------------- | ------- |\n| __text*__    | \u003cem\u003estring\u003c/em\u003e                                                 | The text to show to the user.                                           | -       |\n| defaultValue | \u003cem\u003estring\u003c/em\u003e                                                 | The default answer to the question.                                     | -       |\n| password     | \u003cem\u003eboolean\u003c/em\u003e                                                | Hide the inputs behind `*` when typing the answer.                      | `false` |\n| getDefault   | \u003cem\u003e() =\u003e (string \\| !Promise\u0026lt;string\u0026gt;)\u003c/em\u003e               | The function which will get the default value, possibly asynchronously. | -       |\n| validation   | \u003cem\u003e(answer: string) =\u003e void\u003c/em\u003e                               | The validation function which should throw on error.                    | -       |\n| postProcess  | \u003cem\u003e(answer: string) =\u003e (string \\| !Promise\u0026lt;string\u0026gt;)\u003c/em\u003e | The transformation function for the answer.                             | -       |\n\u003c/details\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/2.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## \u003ccode\u003easync \u003cins\u003easkSingle\u003c/ins\u003e(\u003c/code\u003e\u003csub\u003e\u003cbr/\u003e\u0026nbsp;\u0026nbsp;`question: (string|!Question),`\u003cbr/\u003e\u0026nbsp;\u0026nbsp;`timeout=: number,`\u003cbr/\u003e\u003c/sub\u003e\u003ccode\u003e): \u003ci\u003estring\u003c/i\u003e\u003c/code\u003e\nAsk user a question via the CLI. Returns the answer to the question. \n    If a timeout is passed, the promise will expire after the specified \n    number of milliseconds if the answer was not given.\n\n - \u003ckbd\u003e\u003cstrong\u003equestion*\u003c/strong\u003e\u003c/kbd\u003e \u003cem\u003e\u003ccode\u003e(string \\| \u003ca href=\"#type-question\" title=\"A question.\"\u003e!Question\u003c/a\u003e)\u003c/code\u003e\u003c/em\u003e: The question to present to the user.\n - \u003ckbd\u003etimeout\u003c/kbd\u003e \u003cem\u003e`number`\u003c/em\u003e (optional): How long to wait before rejecting the promise. Waits forever by default.\n\nQuestions can be asked as a simple string.\n\n```js\nimport { askSingle } from 'reloquent'\n\n(async () =\u003e {\n  try {\n    const answer = await askSingle('What brought you her', 10000)\n    console.log(`You've answered: ${answer}`)\n  } catch (err) {\n    console.log()\n    console.log(err)\n    console.log('Nevermind...')\n  }\n})()\n```\n\n```fs\nWhat brought you her: I guess Art is the cause.\n```\n\n```fs\nYou've answered: I guess Art is the cause.\n```\n\nAlternatively, _Reloquent_ can ask a question which is passed as an object of the \u003ca href=\"#type-question\" title=\"A question.\"\u003e`Question`\u003c/a\u003e type, and return a string.\n\n```js\nimport { askSingle } from 'reloquent'\n\n(async () =\u003e {\n  const answer = await askSingle({\n    text: 'Do you wish me to stay so long?',\n    validation(a) {\n      if (a.length \u003c 5) {\n        throw new Error('The answer is too short')\n      }\n    },\n    defaultValue: 'I desire it much',\n    postProcess(a) {\n      return `${a}!`\n    },\n    async getDefault() {\n      return 'I desire it much so'\n    },\n  })\n  console.log(answer)\n})()\n```\n\n```fs\nDo you wish me to stay so long? [I desire it much]\n```\n\n```fs\nI desire it much!\n```\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/3.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## \u003ccode\u003easync \u003cins\u003easkQuestions\u003c/ins\u003e(\u003c/code\u003e\u003csub\u003e\u003cbr/\u003e\u0026nbsp;\u0026nbsp;`questions: !Questions,`\u003cbr/\u003e\u0026nbsp;\u0026nbsp;`timeout=: number,`\u003cbr/\u003e\u003c/sub\u003e\u003ccode\u003e): \u003ci\u003e!Object\u003cstring, string\u003e\u003c/i\u003e\u003c/code\u003e\nAsk user a series of questions via CLI and transform them into answers.\n    Returns an object with keys as questions' texts and values as answers.\n\n - \u003ckbd\u003e\u003cstrong\u003equestions*\u003c/strong\u003e\u003c/kbd\u003e \u003cem\u003e\u003ccode\u003e\u003ca href=\"#type-questions\" title=\"A set of questions.\"\u003e!Questions\u003c/a\u003e\u003c/code\u003e\u003c/em\u003e: A set of questions.\n - \u003ckbd\u003etimeout\u003c/kbd\u003e \u003cem\u003e`number`\u003c/em\u003e (optional): How long to wait before rejecting the promise. Waits forever by default.\n\n\u003ccode\u003e!Object\u0026lt;string, (string \\| \u003ca href=\"#type-question\" title=\"A question.\"\u003e!Question\u003c/a\u003e)\u0026gt;\u003c/code\u003e __\u003ca name=\"type-questions\"\u003e`Questions`\u003c/a\u003e__: A set of questions.\n\n```js\nimport ask from 'reloquent'\n\nconst Ask = async () =\u003e {\n  const questions = {\n    title: {\n      text: 'Title',\n      validation(a) {\n        if (!a) throw new Error('Please enter the title.')\n      },\n    },\n    description: {\n      text: 'Description',\n      postProcess: s =\u003e s.trim(),\n      defaultValue: 'A test default value',\n    },\n    date: {\n      text: 'Date',\n      async getDefault() {\n        await new Promise(r =\u003e setTimeout(r, 200))\n        return new Date().toLocaleString()\n      },\n    },\n  }\n  const res = await ask(questions)\n  return res\n}\n```\n\nIf when provided with the following answers (leaving _Date_ as it is), the result will be returned as an object:\n\n```\nTitle: hello\nDescription: [A test default value] world\nDate: [2/22/2020, 21:37:04] \n\nResult: {\n  \"title\": \"hello\",\n  \"description\": \"world\",\n  \"date\": \"2/22/2020, 21:37:04\"\n}\n```\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/4.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## \u003ccode\u003easync \u003cins\u003econfirm\u003c/ins\u003e(\u003c/code\u003e\u003csub\u003e\u003cbr/\u003e\u0026nbsp;\u0026nbsp;`question: (string|!Question),`\u003cbr/\u003e\u0026nbsp;\u0026nbsp;`options=: !ConfirmOptions,`\u003cbr/\u003e\u003c/sub\u003e\u003ccode\u003e): \u003ci\u003eboolean\u003c/i\u003e\u003c/code\u003e\nAsk a yes/no question. Returns `true` when answer was `y` and `false` otherwise.\n\n - \u003ckbd\u003e\u003cstrong\u003equestion*\u003c/strong\u003e\u003c/kbd\u003e \u003cem\u003e\u003ccode\u003e(string \\| \u003ca href=\"#type-question\" title=\"A question.\"\u003e!Question\u003c/a\u003e)\u003c/code\u003e\u003c/em\u003e: The question, such as \"Add default options\", or \"Continue to delete?\".\n      The question mark can added automatically.\n - \u003ckbd\u003eoptions\u003c/kbd\u003e \u003cem\u003e\u003ccode\u003e\u003ca href=\"#type-confirmoptions\" title=\"Options for the confirmation question.\"\u003e!ConfirmOptions\u003c/a\u003e\u003c/code\u003e\u003c/em\u003e (optional): Options for the confirmation question.\n\n__\u003ca name=\"type-confirmoptions\"\u003e`ConfirmOptions`\u003c/a\u003e__: Options for the confirmation question.\n\n\n|    Name    |       Type       |                               Description                                | Default |\n| ---------- | ---------------- | ------------------------------------------------------------------------ | ------- |\n| defaultYes | \u003cem\u003eboolean\u003c/em\u003e | Whether the default value is _yes_.                                      | `true`  |\n| timeout    | \u003cem\u003enumber\u003c/em\u003e  | How long to wait before rejecting the promise. Waits forever by default. | -       |\n\n```js\nimport { confirm } from 'reloquent'\n\nconst Confirm = async (question) =\u003e {\n  const res = await confirm(question, {\n    defaultYes: false,\n  })\n  return res\n}\n```\n\n```\nDo you wish to continue (y/n): [n] y\n\nResult: true\n```\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/5.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n\n## Copyright\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\n      \u003ca href=\"https://www.artd.eco\"\u003e\n        \u003cimg width=\"100\" src=\"https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png\"\n          alt=\"Art Deco\"\u003e\n      \u003c/a\u003e\n    \u003c/th\u003e\n    \u003cth\u003e© \u003ca href=\"https://www.artd.eco\"\u003eArt Deco™\u003c/a\u003e   2020\u003c/th\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/-1.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartdecocode%2Freloquent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartdecocode%2Freloquent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartdecocode%2Freloquent/lists"}