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

nh

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nh - npm Package Compare versions

Comparing version 0.0.6 to 0.1.0

14

docs/install.md
# Install
## i
Operates through the `nh i <package/s>` command.

@@ -10,1 +12,13 @@

- `-s, --silent` Sets the warn-level to `silent` (same as normal `npm i`)
## is
Use with `nh is <package/s>`.
Same as `nh i`, but saves your package/s to the dependencies.
## isd
Use with `nh isd <package/s>`.
Same as `nh i`, but saves your package/s to the dev dependencies.

@@ -23,1 +23,39 @@ 'use strict';

});
program
.command('is <pkg...>')
.description('install and save a package')
.option('-s, --silent', 'do not output anything')
.action(function (pkg, options) {
var npmconf = {};
npmconf.save = true;
if (options.silent) {
npmconf.loglevel = 'silent';
} else {
npmconf.loglevel = 'info';
}
npm.load(npmconf, function (err, npm) {
npm.commands.install(pkg, function (err) {
if (err) throw err;
});
});
});
program
.command('isd <pkg...>')
.description('install and save a package under dev-dependencies')
.option('-s, --silent', 'do not output anything')
.action(function (pkg, options) {
var npmconf = {};
npmconf['save-dev'] = true;
if (options.silent) {
npmconf.loglevel = 'silent';
} else {
npmconf.loglevel = 'info';
}
npm.load(npmconf, function (err, npm) {
npm.commands.install(pkg, function (err) {
if (err) throw err;
});
});
});

2

package.json
{
"name": "nh",
"version": "0.0.6",
"version": "0.1.0",
"description": "npm helpers",

@@ -5,0 +5,0 @@ "author": "Jona Hugger <jona@kyr.li> (http://kyr.li)",

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