diff options
author | Luis Lobo Borobia <luislobo@gmail.com> | 2018-07-11 01:39:12 +0300 |
---|---|---|
committer | Kat Marchán <kzm@zkat.tech> | 2018-07-11 01:42:34 +0300 |
commit | 244b18380ee55950b13c293722771130dbad70de (patch) | |
tree | 44ed68c9749aea6bdd6e4cb424038d9c11e675cc /doc | |
parent | 738178315fe48e463028657ea7ae541c3d63d171 (diff) |
audit: add support for --parseable output (#20554)
PR-URL: https://github.com/npm/npm/pull/20554
Credit: @luislobo
Reviewed-By: @zkat
Reviewed-By: @iarna
Diffstat (limited to 'doc')
-rw-r--r-- | doc/cli/npm-audit.md | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/cli/npm-audit.md b/doc/cli/npm-audit.md index 3bb13259d..4c6d71741 100644 --- a/doc/cli/npm-audit.md +++ b/doc/cli/npm-audit.md @@ -3,7 +3,7 @@ npm-audit(1) -- Run a security audit ## SYNOPSIS - npm audit [--json] + npm audit [--json|--parseable] npm audit fix [--force|--package-lock-only|--dry-run|--production|--only=dev] ## EXAMPLES @@ -48,6 +48,18 @@ Get the detailed audit report in JSON format: $ npm audit --json ``` +Get the detailed audit report in plain text result, separated by tab characters, allowing for +future reuse in scripting or command line post processing, like for example, selecting +some of the columns printed: +``` +$ npm audit --parseable +``` + +To parse columns, you can use for example `awk`, and just print some of them: +``` +$ npm audit --parseable | awk -F $'\t' '{print $1,$4}' +``` + ## DESCRIPTION The audit command submits a description of the dependencies configured in |