• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..20-Sep-2020-

lib/H03-May-2022-

reporters/H03-May-2022-

CHANGELOG.mdH A D26-Oct-19853.1 KiB8237

LICENSEH A D26-Oct-1985755 1713

README.mdH A D26-Oct-19851.5 KiB4030

package.jsonH A D20-Sep-20201.9 KiB7574

README.md

1# npm audit security report
2
3Given a response from the npm security api, render it into a variety of security reports
4
5[![Build Status](https://travis-ci.org/npm/npm-audit-report.svg?branch=master)](https://travis-ci.org/npm/npm-audit-report)
6[![Build status](https://ci.appveyor.com/api/projects/status/qictiokvxmqkiuvi/branch/master?svg=true)](https://ci.appveyor.com/project/evilpacket/npm-audit-report/branch/master)
7[![Coverage Status](https://coveralls.io/repos/github/npm/npm-audit-report/badge.svg?branch=master)](https://coveralls.io/github/npm/npm-audit-report?branch=master)
8
9The response is an object that contains an output string (the report) and a suggested exitCode.
10```
11{
12  report: 'string that contains the security report',
13  exit: 1
14}
15```
16
17
18## Basic usage example
19
20```
21'use strict'
22const Report = require('npm-audit-report')
23const options = {
24  reporter: 'json'
25}
26
27Report(response, options, (result) => {
28  console.log(result.report)
29  process.exitCode = result.exitCode
30})
31```
32
33
34## options
35
36| option        | values                               | default   | description |
37| :---          | :---                                 | :---      |:--- |
38| reporter      | `install`, `detail`, `json`, `quiet` | `install` | specify which output format you want to use |
39| withColor     | `true`, `false`                      | `true`    | indicates if some report elements should use colors |
40| withUnicode   | `true`, `false`                      | `true`    | indicates if unicode characters should be used|