Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reloquent

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reloquent

A simple Node.js module to query readline

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
Maintainers
1
Weekly downloads
 
Created
Source

reloquent

npm version

reloquent allows to ask user a question.

reloquent(question:string, timeout?:number) => Interface

The function returns a readline instance, with .promise property, which will resolve when the user answers the question. You can also optionally supply a timeout argument after which you want the promise to be rejected.

const reloquent = require('reloquent')

const rl = reloquent('How are you today?')
rl.then((answer) => {
    console.log(`You've answered: %s`, answer) // no timeout
})
const reloquent = require('reloquent')

const rl = reloquent('How are you today?', 5000) // 5s timeout
rl.catch((err) => {
    console.log(err)
    console.log(`Nevermind...`, answer)
})

todo

  • show timer on the right
  • accept other ios
  • reject when closed without answer

(c) Sobesednik-Media 2017

Keywords

FAQs

Package last updated on 23 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc