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

castle

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

castle

Terminal utils for happy scripting

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Castle

Terminal utils for happy scripting

Build Status

Installing

npm install castle

API

castle.prompt(message, options);

message (string, required) — message to display options (object, optional) — see options below:

optiontypedefault valuedescription
allowEmptybooleantrueIf false will ask again on empty input
defaultValuestringundefinedUses default value on empty input
stylestringprompt.Style.DefaultSpecifies prompt color, supported values: prompt.Style.Default, prompt.Style.Dangerous (red)
const {prompt} = require('castle');

prompt('Your name');
prompt
const name = await prompt('Your name', {defaultValue: 'Anonymous'});
prompt with default value

castle.confirm(message, options);

message (string, required) — message to display options (object, optional) — see options below:

optiontypedefault valuedescription
allowEmptybooleantrueIf false will ask again on empty input, otherwise treats empty input as negative answer
defaultValuebooleanundefinedUses default value on empty input
stylestringprompt.Style.DefaultSpecifies prompt color, supported values: confirm.Style.Default, confirm.Style.Dangerous (red)
const {confirm} = require('castle');

const isConfirmed = await confirm('Proceed?');
confirm

Keywords

FAQs

Package last updated on 14 May 2020

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