New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sync-prompt

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sync-prompt

Synchronously prompt your user for command-line input.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
53
increased by51.43%
Maintainers
1
Weekly downloads
 
Created
Source

sync-prompt

Build Status Dependency Status

Synchronously prompt users for command-line input. Do more on Node.js, with less.

Usage

Simply run npm install sync-prompt, and you should be good to go.

Example usage:

var prompt = require('sync-prompt').prompt;

var name = prompt("What is your name? ");
// User enters "Mike".

console.log("Hello, " + name + "!");
// -> Hello, Mike!

API

.prompt([question])

When called, it will prompt the user for a command line input.

Optionally, you can pass in a string argument, and it will be displayed to the console. Note: unlike Node.js' console.log, the string will not end with a newline character.

Running Tests

Be sure that you have the dependencies installed, locally, for the project:

npm install

And then run the tests:

npm test

Licence

Unless stated in file headers, the license is found in the LICENSE file.

Keywords

FAQs

Package last updated on 29 Jul 2013

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