Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

help

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

help - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

5

index.js
var path = require('path')
, fs = require('fs')
module.exports = function(file) {
module.exports = function(file, stream) {
stream = stream || process.stdout
file = file

@@ -13,3 +14,3 @@ ? file

var rs = fs.createReadStream(file)
rs.pipe(process.stdout)
rs.pipe(stream)
rs.on('close', function() {

@@ -16,0 +17,0 @@ if (code) process.exit(code)

2

package.json
{
"name": "help",
"version": "2.0.0",
"version": "2.1.0",
"description": "substack way of --help",

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

@@ -23,3 +23,3 @@ # help

help(filepath)
help(filepath, stream)

@@ -32,2 +32,4 @@ returns function(code)

`stream` defaults to `process.stdout`
## Full example

@@ -44,3 +46,3 @@

// the first arg must be a number
if (isNan(args[0])) {
if (isNaN(args[0])) {
// process prints contents of `usage.txt` and exits with code 1

@@ -47,0 +49,0 @@ return help(1)

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