{"id":20305697,"url":"https://github.com/bitpay/ttyread","last_synced_at":"2025-04-11T14:51:16.362Z","repository":{"id":57382057,"uuid":"46884281","full_name":"bitpay/ttyread","owner":"bitpay","description":"Gather input from a terminal","archived":false,"fork":false,"pushed_at":"2023-03-08T08:10:09.000Z","size":8,"stargazers_count":4,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T04:47:12.007Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bitpay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-25T20:21:20.000Z","updated_at":"2023-02-22T16:52:55.000Z","dependencies_parsed_at":"2024-09-16T06:04:23.467Z","dependency_job_id":null,"html_url":"https://github.com/bitpay/ttyread","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.09999999999999998,"last_synced_commit":"9c260aa71c22cc3d064eec94b4fbb9f52dbf5a28"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitpay%2Fttyread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitpay%2Fttyread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitpay%2Fttyread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitpay%2Fttyread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitpay","download_url":"https://codeload.github.com/bitpay/ttyread/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248424654,"owners_count":21101207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-14T17:09:23.497Z","updated_at":"2025-04-11T14:51:16.342Z","avatar_url":"https://github.com/bitpay.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ttyread\nGather input from a terminal\n\nThe module provides a similar API to the \"read\" module, but it\ndoesn't use the readline builtin and it reads input directly\nfrom a tty device.  This is useful if you need to support the\nability to redirect stdio, but also need to read input from a\nuser (not from stdin).  Attempts to adapt a few other packages\nto do this properly failed, hence ttyread.\n\n## USAGE\n\n```javascript\nvar ttyread = require(\"ttyread\")\nttyread(prompt, options, callback)\n```\n\nThe prompt can be omitted or specified as an option.  The options\nargument can also be omitted.  The first argument passed to the \ncallback is an error if one occurs.  The second argument is the \nuser input.  If the user cancels the input, both the error and\nresult arguments will be undefined.\n\n## OPTIONS\n\nEvery option is optional.  These options are meant to be compatible\nwith the \"read\" module, but not every feature of that module is\nsupported.\n\n* `prompt` What to write to stdout before reading input.\n* `silent` Don't echo the output as the user types it.\n* `replace` Replace silenced characters with the supplied character value.\n* `default` The default value if the user enters nothing.\n* `device` The path to the device file. (default `/dev/tty`)\n\nIf replace is set, silent is implied.  Replace can be set to an\nempty string and have the same effect as setting silent to true.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitpay%2Fttyread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitpay%2Fttyread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitpay%2Fttyread/lists"}