Open the npm link for the package
This is meant to be used in command-line tools and scripts, not in the browser.
npm install --save open-npm-link
Warning: This package is native ESM and no longer provides a CommonJS export. If your project uses CommonJS, you will have to convert to ESM or use the dynamic import()
function. Please don't open issues for questions regarding CommonJS / ESM.
import open from 'open-npm-link';
// Opens the react npm link in the default browser.
await open('lodash');
// Opens the react npm link in the specified browser.
await open('lodash', 'chrome');
function(packageName?: string, browser?: string): string;
chrome
- Web browserfirefox
- Web browseredge
- Web browserbrowser
- Default web browserbrowserPrivate
- Default web browser in incognito mode
browser
and browserPrivate
only supports chrome
, firefox
, and edge
.
- open-npm-link-cli - CLI for this module
This project is created using generator-stupid.