package
open Github repo pages for npm modules in your browser
npm install opengGitHub-flavored package documentation.
Across all versions, last 30 days.
105 in 30 days
Runtime metadata.
Tagged topics.
open Github repo pages for npm modules in your browser
npm install opengRequires Node.js 20 or newer.
const openg = require('openg');
openg();
//=> returns a promise that opens the github page for the current directory in-browser
openg('express');
//=> returns a promise that opens the github page for express in-browser
openg(['inf', 'sist', 'openg'], {
issues: true
});
//=> returns a promise that opens the github issues pages for all in-browserType: string | array
npm modules name(s) you want to open in your browser
Urls come from the module's homepage (or bugs.url with issues: true). When
those are missing — which is common — they are inferred from the repository
field instead, including the subdirectory for packages published out of a
monorepo. Every form npm allows is understood: "user/repo" shorthand, a bare
url, or an object using git:, git+ssh:, or https:.
Called with no target, openg answers for the repo you're standing in, reading
the local checkout rather than the registry: the local package.json first, then
the git remote. Unpublished and private repos work, and no network request is
made unless neither of those resolves.
Type: optional object
Pass these in to modify the behavior of openg
Open the GitHub issues page for specified repo(s)
Return the url's that would be opened and do not open them in-browser
Example usage:
openg('openg', {
issues: true,
dryRun: true
}).then(resp => {
console.log(resp);
});
//=> ['https://github.com/dawsonbotsford/openg/issues']Print each url to stdout as it is resolved
Type: promise
Resolves with an array of url value(s), in the same order as target.
Every module is attempted, so one bad name does not stop the others from
opening. If any of them fail, the promise rejects with an
AggregateError
whose .errors holds one error per failed module.
MIT © Dawson Botsford
Estimated unpacked size across 23 packages.
4.1 MB
Includes dependencies.
4 direct · 4 outdated
^8.4.2
11.0.4
^2.0.1
3.0.0
^7.0.0
10.0.1
^8.1.0
10.1.1