Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
lib/ | 12-May-2024 | - | 61 | 51 | ||
reporters/ | 12-May-2024 | - | 393 | 326 | ||
CHANGELOG.md | D | 12-May-2024 | 3.1 KiB | 82 | 37 | |
LICENSE | D | 12-May-2024 | 755 | 17 | 13 | |
README.md | D | 12-May-2024 | 1.5 KiB | 40 | 30 | |
index.js | D | 12-May-2024 | 588 | 26 | 21 | |
package.json | D | 12-May-2024 | 1.9 KiB | 77 | 76 |
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|