{"_id":"@astronautlabs/read","_rev":"1-30827abb782a62fd28c949d6a050c2ff","name":"@astronautlabs/read","dist-tags":{"latest":"2.0.1"},"versions":{"2.0.0":{"name":"@astronautlabs/read","version":"2.0.0","main":"dist/read.js","types":"dist/read.d.ts","publishConfig":{"access":"public"},"dependencies":{"mute-stream":"~1.0.0"},"devDependencies":{"@types/chai":"^4.3.4","@types/mute-stream":"^0.0.1","chai":"^4.3.7","razmin":"^1.2.0","typescript":"^4.9.5"},"engines":{"node":"^14.17.0 || ^16.13.0 || >=18.0.0"},"author":{"name":"Astronaut Labs, LLC"},"description":"read(1) for node programs","repository":{"type":"git","url":"git+https://github.com/astronautlabs/read.git"},"license":"MIT","scripts":{"build":"tsc -b .","test":"npm run build && node dist/test","prepublishOnly":"npm test"},"gitHead":"833608c23e2f5aa8f199541397d68ccfffbc4804","bugs":{"url":"https://github.com/astronautlabs/read/issues"},"homepage":"https://github.com/astronautlabs/read#readme","_id":"@astronautlabs/read@2.0.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-kwFWmOT46fNNdwPIH6d9Wr5kKbafXXDZtBFrE8Tt5Hhd2t4kc3/+sUceAQLewwYPQcUTXlo7ioNvX85CBPOsJA==","shasum":"a2a6de3c299ac65f30a45c6d831b5115402fec8c","tarball":"https://registry.npmjs.org/@astronautlabs/read/-/read-2.0.0.tgz","fileCount":21,"unpackedSize":22804,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAYXXjdseKc9iV2+QHZm8+UH39MA6FUCNN422HH67Nt6AiEA0Y/XFRbaifdj/6rm2iMq9cGnxPJGaVK7xV66WOFdxkc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3K18ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoS1g/+OOcEW8iUKj9UbZJqU7ypjVcxIM2A1y7TqJFOpZP0LMjzqL9H\r\nrw8Z6F7DDtVuBtGqeOcKYRY9H3lSkvno6lD6lODdvKfObp5+TpITTRO4p5GM\r\n/8N/kldVixApxv1cLpHGvj69XN9mEg82NCsw2s1M2KCKqdpRAbvPIEHAquVd\r\nC4Lpa/EG8YnHAAeMYD7lfiMXEMyNG1oF7Iui5QQpgdrTxDUxTAJpkyExIup9\r\nryzc4669xW5c5WZjGBLXIRjFGx77yCkXkQjfjacCQfOgTHeBbi0boM+o1+mS\r\njZid5XlLF1iAdfsH/3MwLdqUd60QS6Sp412sS1dVztnjLmPOzbr4nDaFyVjB\r\nLcFWaOAWIxy9KpTPCZIF5upGbaEajglx3T0vO3Gd6Bi7tdr9juj8ig4fVCAH\r\n1yHOPFhwcn/M3kjc1BVj9bsXRs35+9s0wctHnLRjx1Sv60/OIuPs2/gDjrf4\r\nMVUxraYq/OUbzinXUgT6Nzo2MJimEzmjXmqp9FQVzvhRK0Z/72s4BzOzinbS\r\nGXCBfvbgBeFvFvY0fu9Tn6gpueTYSkvbZ4bfFhP/pg40oy7QmadxlJ0VDjJe\r\nH4Zy3l8pVbghjRfpDS5HA7Ao3Tsa6HMEDhJj0IlTpG8dV/2eBUOSjuwMuxje\r\nXd/66AETrbmXukiCGU6KXpNa7kLoqOO1UFY=\r\n=gynp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rezonant","email":"wilahti@gmail.com"},"directories":{},"maintainers":[{"name":"rezonant","email":"wilahti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read_2.0.0_1675406715978_0.8132008788231451"},"_hasShrinkwrap":false},"2.0.1":{"name":"@astronautlabs/read","version":"2.0.1","main":"dist/read.js","types":"dist/read.d.ts","publishConfig":{"access":"public"},"dependencies":{"mute-stream":"~1.0.0"},"devDependencies":{"@types/chai":"^4.3.4","@types/mute-stream":"^0.0.1","chai":"^4.3.7","razmin":"^1.2.0","typescript":"^4.9.5"},"engines":{"node":"^14.17.0 || ^16.13.0 || >=18.0.0"},"author":{"name":"Astronaut Labs, LLC"},"description":"read(1) for node programs","repository":{"type":"git","url":"git+https://github.com/astronautlabs/read.git"},"license":"MIT","scripts":{"build":"tsc -b .","test":"npm run build && node dist/test","prepublishOnly":"npm test"},"gitHead":"ba8b0e14bd3c8ff8a6026a95503618d9eb7324c4","bugs":{"url":"https://github.com/astronautlabs/read/issues"},"homepage":"https://github.com/astronautlabs/read#readme","_id":"@astronautlabs/read@2.0.1","_nodeVersion":"18.13.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-/AQav7OFzAQqbGf8W51tY7jbxMPEzy2ti2pWcgbNKpWcjBqZhkzOIZYR+Qw2gOa7r80xPvkNznTz8GGGEiJJxw==","shasum":"dd56f73d162331c1af315533dd993028ca8d2698","tarball":"https://registry.npmjs.org/@astronautlabs/read/-/read-2.0.1.tgz","fileCount":21,"unpackedSize":22828,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAMGbzqpnrNLF8aaqI8v8rK+UwvnGUi6/lF9y7WEkfIBAiEA1gjbTMEh9uqV7a3K8gbUL3aAlGfKqckiiOgKwohE4yc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3K4CACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpovw//a4BmBYzn7TEqU6IID4cPZ5ILTu75iIRhGwc2vVJZ3iXR5TAY\r\nGqGhIfdtVUwLGSZiiFpNXpyxaLDMQR6s88GlHuY16SUmbotMxX6FkTc5w/6f\r\n5qYo9Wb6X36oQhsH7Y5dI1SjF2Co2avRUX10uPFYYpNrKMzy6qwl03TqquC8\r\nxcmHfU1gNuA1MwwOHgUNekoE8mSeWyR8oUqfa7JyCnhefJYrD8TQewWD7R0j\r\n24RNExSzxF9ioYdrICCVQ+370DruE8rPHeUeP5ny7FgfPE1+iQ+wqgRD5my3\r\nJVH3Xh9C7KlTFkqGZLszRdOECl1nAPypgjrnbROF6Jp6r1jnceruSi2hpQZ1\r\niRDiNl0ulp4VufItIHhd28vt88RgmzxUoxbjlVD2+UF3No/gytoIkHGPeEOh\r\n0tar03kE9oRwQbvXop0Jyy999BqcI55QCDUL3rv5Xe+Iwrrx64exiv7WR1Tk\r\nEGF4Ywv8KEhMGFolXzp6/zxfxx1WXWNs254VA9xajOiGO4aNVQE3mTGahFDw\r\n6hgmvCs49aY8hM4UdPv2HHvE2wR9FF5r2t4yKEvWPoVFvHQu9P2mjt53GTGn\r\n1R/s8l8DHhl9zUAZ8jZFC/nQFrO9rt8gcPCBy9PleAvqpXVQNxjTCfEVstVj\r\nX9oh/sWWT3U3TSpaBMZUbINimyH2jnFBkUc=\r\n=c7HO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rezonant","email":"wilahti@gmail.com"},"directories":{},"maintainers":[{"name":"rezonant","email":"wilahti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read_2.0.1_1675406849902_0.18958859259649552"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-03T06:45:15.889Z","2.0.0":"2023-02-03T06:45:16.131Z","modified":"2023-02-03T06:47:30.207Z","2.0.1":"2023-02-03T06:47:30.085Z"},"maintainers":[{"name":"rezonant","email":"wilahti@gmail.com"}],"description":"read(1) for node programs","homepage":"https://github.com/astronautlabs/read#readme","repository":{"type":"git","url":"git+https://github.com/astronautlabs/read.git"},"author":{"name":"Astronaut Labs, LLC"},"bugs":{"url":"https://github.com/astronautlabs/read/issues"},"license":"MIT","readme":"# @/read\r\n\r\nFor reading user input from stdin. Similar to the `readline` builtin's `question()` method, but with a\r\nfew more features.\r\n\r\n## Usage\r\n\r\n```typescript\r\nimport read from \"@astronautlabs/read\";\r\ntry {\r\n  const result = await read(options)\r\n} catch (err) {\r\n  console.error(err);\r\n}\r\n```\r\n\r\n## Options\r\n\r\nEvery option is optional.\r\n\r\n* `prompt` What to write to stdout before reading input.\r\n* `silent` Don't echo the output as the user types it.\r\n* `replace` Replace silenced characters with the supplied character value.\r\n* `timeout` Number of ms to wait for user input before giving up.\r\n* `default` The default value if the user enters nothing.\r\n* `edit` Allow the user to edit the default value.\r\n* `terminal` Treat the output as a TTY, whether it is or not.\r\n* `input` Readable stream to get input data from. (default `process.stdin`)\r\n* `output` Writable stream to write prompts to. (default: `process.stdout`)\r\n\r\nIf silent is true, and the input is a TTY, then read will set raw\r\nmode, and read character by character.\r\n\r\n## Contributing\r\n\r\nPatches welcome.\r\n","readmeFilename":"README.md"}