-
Notifications
You must be signed in to change notification settings - Fork 0
view
Subhajit Sahu edited this page Apr 24, 2021
·
10 revisions
Views registry info about a package.
enpm view <package> [field]... [options]
# package: name of the package
# field: package field to view
## fields in package.json (name, version, dependencies, ...)
## scope, stars, contents, readme, dependents
## available, downloads, downloads.month, downloads.week, downloads.day
## date, date.rel, publisher, maintainers, maintainers.username, maintainers.email
## score, score.quality, score.popularity, score.maintenance
# -> value of package field(s)
# -> empty if not available
# Options:
# --help: view this help
# --silent: enable showing only -1 on error (0)
# Environment variables:
$NPM_SILENT # enable showing only -1 on error (0)
$ enpm view esprima
# get basic info about "esprima"
## ...
$ enpm view esprima version
# get latest version of "esprima"
## 4.0.1
$ enpm view esprima author license
# get author and license of "esprima"
## author = 'Ariya Hidayat <ariya.hidayat@gmail.com>'
## license = 'BSD-2-Clause'
$ enpm view esprima stars
# get stars of "esprima"
## 73
$ enpm view esprima contents
# get contents of "esprima"
## package.json
## ChangeLog
## LICENSE.BSD
## README.md
## bin\esparse.js
## bin\esvalidate.js
## dist\esprima.js
$ enpm view esprima "#dependents"
# get number of dependents of "esprima"
## 1379