• Home
Name Date Size #Lines LOC

..--

lib/12-May-2024-6151

reporters/12-May-2024-393326

CHANGELOG.mdD12-May-20243.1 KiB8237

LICENSED12-May-2024755 1713

README.mdD12-May-20241.5 KiB4030

index.jsD12-May-2024588 2621

package.jsonD12-May-20241.9 KiB7776

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|