{"name":"@inquirer/number","version":"4.1.0","keywords":["answer","answers","ask","base","cli","command","command-line","confirm","enquirer","generate","generator","hyper","input","inquire","inquirer","interface","iterm","javascript","menu","node","nodejs","prompt","promptly","prompts","question","readline","scaffold","scaffolder","scaffolding","stdin","stdout","terminal","tty","ui","yeoman","yo","zsh"],"author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","_id":"@inquirer/number@4.1.0","maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"},{"name":"mischah","email":"mail@michael-kuehnel.de"}],"homepage":"https://github.com/SBoudrias/Inquirer.js/blob/main/packages/number/README.md","bugs":{"url":"https://github.com/SBoudrias/Inquirer.js/issues"},"dist":{"shasum":"841489e68dcaf76a8fce19b5c0b48b14eced240f","tarball":"http://registry-npm.ywwl.com/@inquirer/number/download/@inquirer/number-4.1.0.tgz","fileCount":5,"integrity":"sha512-VMXB/XejCbaSTf9Xucl7dqjzzsaGsrs6XwSYXPbGZ2QbSuq/Gz8XamhSi9ClRubNXZlGry9xVg1tKkJdTDgCtQ==","signatures":[{"sig":"MEQCIC1zgwXpGIhBdjwuODKjj2LPqrg29cE+Xbir+TRnZMYAAiAYXBIeoj1VXbH2/nnYNZnD+CeQGEM1tqIuzf1wFVbf7w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12156,"size":4140,"noattachment":false,"key":"/@inquirer/number/-/@inquirer/number-4.1.0.tgz"},"type":"module","engines":{"node":">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0"},"exports":{".":"./src/index.ts","./package.json":"./package.json"},"gitHead":"5ca6d1101d5d3f8fb066cd5b389bccfdafbbe0c0","scripts":{"tsc":"tsc"},"_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"repository":{"url":"git+https://github.com/SBoudrias/Inquirer.js.git","type":"git"},"_npmVersion":"lerna/5.2.1/node@v26.2.0+arm64 (darwin)","description":"Inquirer number prompt","directories":{},"sideEffects":false,"_nodeVersion":"26.2.0","dependencies":{"@inquirer/core":"^11.2.0","@inquirer/type":"^4.0.6"},"publishConfig":{"main":"./dist/index.js","types":"./dist/index.d.ts","access":"public","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"}},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.2","@repo/tsconfig":"workspace:*"},"peerDependencies":{"@types/node":">=18"},"peerDependenciesMeta":{"@types/node":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/number_4.1.0_1779738456889_0.6424375766902599","host":"s3://npm-registry-packages-npm-production"},"readme":"# `@inquirer/number`\n\nInteractive free number input component for command line interfaces. Supports validation, filtering, transformation, etc.\n\n# Installation\n\n<table>\n<tr>\n  <th>npm</th>\n  <th>yarn</th>\n</tr>\n<tr>\n<td>\n\n```sh\nnpm install @inquirer/prompts\n```\n\n</td>\n<td>\n\n```sh\nyarn add @inquirer/prompts\n```\n\n</td>\n</tr>\n<tr>\n<td colSpan=\"2\" align=\"center\">Or</td>\n</tr>\n<tr>\n<td>\n\n```sh\nnpm install @inquirer/number\n```\n\n</td>\n<td>\n\n```sh\nyarn add @inquirer/number\n```\n\n</td>\n</tr>\n</table>\n\n# Usage\n\n```js\nimport { number } from '@inquirer/prompts';\n// Or\n// import number from '@inquirer/number';\n\nconst answer = await number({ message: 'Enter your age' });\n```\n\n## Options\n\n| Property | Type                                                                       | Required | Description                                                                                                                                                                                                                                                     |\n| -------- | -------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| message  | `string`                                                                   | yes      | The question to ask                                                                                                                                                                                                                                             |\n| default  | `number`                                                                   | no       | Default value if no answer is provided (clear it by pressing backspace)                                                                                                                                                                                         |\n| min      | `number`                                                                   | no       | The minimum value to accept for this input.                                                                                                                                                                                                                     |\n| max      | `number`                                                                   | no       | The maximum value to accept for this input.                                                                                                                                                                                                                     |\n| step     | `number \\| 'any'`                                                          | no       | The step option is a number that specifies the granularity that the value must adhere to. Only values which are equal to the basis for stepping (min if specified) are valid. This value defaults to 1, meaning by default the prompt will only allow integers. |\n| required | `boolean`                                                                  | no       | Defaults to `false`. If set to true, `undefined` (empty) will not be accepted for this.                                                                                                                                                                         |\n| validate | `(number \\| undefined) => boolean \\| string \\| Promise<boolean \\| string>` | no       | On submit, validate the filtered answered content. When returning a string, it'll be used as the error message displayed to the user. Note: returning a rejected promise, we'll assume a code error happened and crash.                                         |\n| theme    | [See Theming](#Theming)                                                    | no       | Customize look of the prompt.                                                                                                                                                                                                                                   |\n\n## Theming\n\nYou can theme a prompt by passing a `theme` object option. The theme object only need to includes the keys you wish to modify, we'll fallback on the defaults for the rest.\n\n```ts\ntype Theme = {\n  prefix: string | { idle: string; done: string };\n  spinner: {\n    interval: number;\n    frames: string[];\n  };\n  style: {\n    answer: (text: string) => string;\n    message: (text: string, status: 'idle' | 'done' | 'loading') => string;\n    error: (text: string) => string;\n    defaultAnswer: (text: string) => string;\n  };\n};\n```\n\n# License\n\nCopyright (c) 2023 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))<br/>\nLicensed under the MIT license.\n","publish_time":1779738457019,"_cnpm_publish_time":1779738457019,"dist-tags":{"latest":"4.3.0"}}