Gathering detailed insights and metrics for menu
Gathering detailed insights and metrics for menu
Gathering detailed insights and metrics for menu
Gathering detailed insights and metrics for menu
npm install menu
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
4 Stars
30 Commits
1 Forks
3 Watchers
1 Branches
1 Contributors
Updated on Jan 05, 2022
Latest Version
0.2.5
Package Id
menu@0.2.5
Size
3.62 kB
NPM Version
3.3.12
Node Version
5.2.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A cli menu for your node.
npm install menu
Menu is built around tabs.
There are currently four types:
These tabs are declared as such...
var content = {
tab1: {title:"column1", seltitle: "COLUMN1", type:"toggle", val:"true", color:"blue"},
tab2: {title:["column2", "column22"], seltitle: ["COLUMN2", "COLUMN22"], type:"search", input: 0, val:"abcdefgh", color:"red"},
tab3: {title:"column3", seltitle: "COLUMN3", type:"list", input: 0, val:["a", "b", "c"], color:"white"},
tab4: {title:"column4", seltitle: "COLUMN4", type:"select", input: 0, val:["1","2","3","4","5","6"], color:"green"}
}
title: This is the tabs label when it's not focused.
seltitle: This is the tabs label when it is focused.
type: This is the tab's type.
input: This is the index value for a list, select, and search tabs.
val: For type toggle, it's a boolean value. For types list and select, it's an array of values. For type search it's a string.
color: The tab's set color. Look at the node clivas for all possible values.
var menu = require('./index.js');
menu.init(content);
menu.draw() //this draws the headers
menu.clivas //you can custom draw with clivas
function work() {
menu.start(options, function(result) {
var key = result[0]; //refer to node keypress for all properties
var column = result[1]; //the focused tab
menu.draw(); //draw tabs
if(key.name=="return" && column.id === 4) {
menu.clivas.line(Math.abs(column.input%column.val.length)); //always mod your column input to determine focused index
} else if(key.name=="return" && column.id === 2) {
menu.clivas.line("You searched for "+column.val);
column.val = "";
} else if(key.ctrl && key.name ==="c") {
process.exit();
} else if(key.name ==="backspace") {
} else if(key.name ==="left") {
} else if(key.name ==="up") {
} else if(key.name ==="down") {
} else if(key.name ==="right") {
} else {
}
if(column.id === 1) { //use tab 1 to toggle tab 4's select contents
if(column.val) {
menu.columns["tab4"].val = ["z","y","x","w"];
} else {
menu.columns["tab4"].val = ["1","2","3","4","5","6"];
}
menu.draw();
}
})
} work();
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More