New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

open-docs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open-docs

manpage command for npm, opens package homepage or readme

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
 
Created
Source

open-docs

Build Status Coverage Status semantic-release Commitizen friendly npm version

Opens a package's homepage in your preferred browser, but if the package is installed locally, and has no homepage or the homepage is just a README, opens the local copy of its README.md in your preferred editor instead.

Install

npm install --global open-docs

CLI

open-docs react
# opens the homepage for react
open-docs p-timeout
# if p-timeout is installed locally, opens its README.md from the local copy.
# otherwise, opens the homepage for p-timeout (which is just README.md on GitHub)

Node.js API

getManpage(query: string | {cwd: string, packageName: string}): string

const { getManpage } = require('open-docs')

const reactManpage = getManpage('react')
const pTimeoutLocal = getManpage({
  cwd: '/my-project',
  packageName: 'p-timeout',
})

query: string | {cwd: string, packageName: string}

Either the package name as a string, or an object with the package name, and the working directory (cwd) to search for a locally installed copy within

Returns

A URL to the package's homepage, or otherwise a path to the package's README.md if it is installed under ${cwd}/node_modules. If the package is not found, throws an Error.

Keywords

manpage

FAQs

Package last updated on 22 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts