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

terminal-i2

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terminal-i2 - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

image.png

4

package.json
{
"name": "terminal-i2",
"version": "1.1.0",
"description": "",
"version": "1.1.1",
"description": "With this module you can create interactive menus in your terminal. Use the `createMenu` class provided by the module for this. This is a first version and we will add other functionalities.",
"type": "module",

@@ -6,0 +6,0 @@ "main": "./dist/index.js",

# Terminal i2
## Description
With this module you can create interactive menus in your terminal. Use the `Menu` class provided by the module for this.
With this module you can create interactive menus in your terminal. Use the `createMenu` class provided by the module for this.
This is a first version and we will add other functionalities.

@@ -11,2 +11,51 @@

pnpm install terminal-i2
```
```
## Usage
- Type of options menu
- title: Title of the menu
- options: Different options that the menu will have
- markedOption: default option marked
- colorTitle: color of the title
- colorOption: color of the options
- bgColorOption: color of the background of the options
- colorOptionHover: color of the options when the selector is over
- bgColorOptionHover: color of the background of the options when the selector is over
![type-options-menu](image.png)
- Example 1
```javascript
import { createMenu } from 'terminal-i2';ç
const menu = new createMenu({
colorTitle: 'red',
bgColorOption: '',
colorOption: 'white',
bgColorOptionHover: 'bgYellow',
colorOptionHover: 'red',
});
const option = await menu
.head(`[white]Titulo del menu[/white]`)
.item("Opción 1", true)
.item("Opción 2")
.item("Opción 3")
.render()
```
- Example 2
```javascript
import { createMenu } from 'terminal-i2';
const menu = new createMenu({
colorTitle: 'red',
bgColorOption: '',
colorOption: 'white',
bgColorOptionHover: 'bgYellow',
colorOptionHover: 'red',
title: 'Titulo del menu',
options: ['Opción 1', 'Opción 2', 'Opción 3'],
markedOption: 1
});
const option = await menu.render()
```
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