Published packages don't always include a link to their source on GitHub.
The linked repository is not necessarily representative of published package.
Package root provides links to all available versions, and highlights the one tagged as
When viewing a package on npm, it is conveniently accessible with a one-char edit to the page url.
- https://www.npmjs.com/package/<name> + https://www.npmfs.com/package/<name>
Specific package versions can be accessed directly.
Directories and files inside the package are viewed by appending the path.
https://npmfs.com/package/<name>/<version>/<path> https://npmfs.com/package/<name>/<version>/example/ https://npmfs.com/package/<name>/<version>/example/index.js
Package versions are compared (
version-0 .. version-1) by navigating to the root directory of
version-0, clicking on the
diff link in the top right, and selecting
version-1 in the version list.
In this compare view, line numbers are a shortcut to their respective file's source.
Deep links are found on the right side of lines in both the file and diff views. These links will add a hash to the url which scrolls the browser to the selected line, and highlights it.
The sticky header sections often contain useful links to navigate between pages.
$ go run main.go
Requires a least
go1.11 (for go modules support) and
git to be installed.
Tests are run using the standard go test command (
go test ./...).