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

package-menu-cli

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

package-menu-cli - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

.editorconfig

2

package.json
{
"name": "package-menu-cli",
"version": "1.3.2",
"version": "1.3.3",
"description": "Displays menu of scripts from directory containing `package.json`",

@@ -5,0 +5,0 @@ "main": "cli.js",

/*global require*/
const chalk = require('chalk');
const Table = require('cli-table2'); // INFO: https://www.npmjs.com/package/cli-table2
const Table = require('cli-table2'); // INFO: https://www.npmjs.com/package/cli-table2
const fs = require('fs');

@@ -9,44 +9,42 @@

console.log(opts);
if (!pkgInfo.hasOwnProperty('scripts')) {
return {error: true, message: 'package.json does not contain any scripts'};
}
if (!pkgInfo.hasOwnProperty('scripts')) {
return {error: true, message: 'package.json does not contain any scripts'};
}
let table;
let table;
// instantiate
if (opts.compress) {
table = new Table({
head: ['Name']
});
}
else {
table = new Table({
head: ['Name', 'Script'],
colWidths: [20]
});
}
// instantiate
if (opts.compress) {
table = new Table({
head: ['Name']
});
}
else {
table = new Table({
head: ['Name', 'Script'],
colWidths: [20]
});
}
const scripts = pkgInfo.scripts;
const scriptNames = Object.keys(scripts);
const scripts = pkgInfo.scripts;
const scriptNames = Object.keys(scripts);
if (opts.sort) {
scriptNames.sort();
}
if (!opts.compress) {
scriptNames.map((item) => {
table.push(
[item, scripts[item]]
);
});
}
else {
scriptNames.map((item) => {
table.push([item]);
});
}
if (opts.sort) {
scriptNames.sort();
}
if (!opts.compress) {
scriptNames.map((item) => {
table.push(
[item, scripts[item]]
);
});
}
else {
scriptNames.map((item) => {
table.push([item]);
});
}
return table;
return table;
}

@@ -53,0 +51,0 @@

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