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

press-enter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

press-enter

BBS-style ANSI color enter prompts for Node.js modules or the CLI

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

press-enter

BBS-style ANSI color enter prompts for Node.js modules or the CLI

image

There are 9 animated prompts and 6 static prompts.

The animated prompts were ported from an old PCBoard PPE (EPE1PWA.ZIP) originally released on February 17, 1994, a little over twenty years ago.

image

The static prompts were extracted from the default install of Iniquity BBS software v1.01, released on July 26, 1997.

image

Here's are the prompts in use in their corresponding software:

Animated prompt in PCBoard

image

Static prompt in Iniquity

image

Static prompts:

image

Installation

npm install -g press-enter

Usage

To use press-enter, your terminal must support ANSI colors with bright settings. I use iTerm2 with the Report Terminal Type setting at xterm-256color and colors set to the Dark Background preset.

CLI usage

press-enter [style] [color]
  style: 0-13
  color: red, yellow, green, blue, cyan, magenta, grey

For example, if you want to use the 4th prompt in Red, you can type

press-enter 4 red

or specify that in your shell scripts.

0-8 are animated prompts, 9-13 are static.

Running press-enter by itself will default to the 3rd style in the color blue.

Node usage

You can use press-enter anywhere where you want to control flow. The callback fires after the user presses enter.

pressEnter([options], callback)

Options is an optional hash, you can omit it:

var pressEnter = require('press-enter');

pressEnter(function() {
	process.exit();
});
OptionDescription
styleStyle from 0-13, 0-8 are animated, 9-13 are static
colorred, yellow, green, blue, cyan, magenta, grey. Defaults to blue.
centeredWhether or not to try to detect the number of columns in the terminal and center the prompt. Defaults to true.
inputNode.js stream, defaults to stdin
outputNode.js stream, defaults to stdout

Example specifying options:

var pressEnter = require('press-enter');

pressEnter({style: 3, color: red}, function() {
	process.exit();
});

License

MIT

FAQs

Package last updated on 07 Jan 2015

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