# security-txt-node-parser

> A parser for security.txt files

Latest version **1.0.4** (published 2020-08-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install security-txt-node-parser
pnpm add security-txt-node-parser
yarn add security-txt-node-parser
bun add security-txt-node-parser
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2020-08-20 |
| First published | 2020-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Movitz Sunar |
| Maintainers | movitz-s |
| Keywords | security, security.txt, parser |

## Links

- npm: https://www.npmjs.com/package/security-txt-node-parser
- Repository: https://github.com/movitz-s/security-txt-node-parser
- Homepage: https://github.com/movitz-s/security-txt-node-parser#readme
- Issues: https://github.com/movitz-s/security-txt-node-parser/issues
- npm.io page: https://npm.io/package/security-txt-node-parser

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2020-08-20
- 1.0.3 — 2020-07-08
- 1.0.2 — 2020-07-08
- 1.0.1 — 2020-04-06

## README

# security.txt Node Parser
![](https://github.com/movitz-s/security-txt-node-parser/workflows/Node.js%20CI/badge.svg)
![](https://codecov.io/gh/movitz-s/security-txt-node-parser/branch/master/graph/badge.svg)
> parsing security.txt documents, zero dependencies, based on [draft-foudil-securitytxt-09](https://tools.ietf.org/html/draft-foudil-securitytxt-09)

## Installing
```sh
npm install security-txt-node-parser
```

## Example
```js
const parseSecurityTxt = require('security-txt-node-parser').default

const securityTxt = await fetch('https://securitytxt.org/.well-known/security.txt')
	.then(resp => resp.text())
	.then(text => parseSecurityTxt(text))

console.log(securityTxt.contact[0]) // https://hackerone.com/ed
```

### Options

These options are avaliable

```js
parseSecurityTxt(document, {
	strict: true,
	parseUrls: true,
	parseDates: true
})
```

| property   | default | description                                                           |
|------------|---------|-----------------------------------------------------------------------|
| strict     | false   | if strict is true, an error will be thrown if the document is invalid |
| parseUrls  | false   | if parseUrls is true, any urls will be wrapped in the URL object      |
| parseDates | false   | if parseDates is true, any dates will be wrapped in the Date object   |
  

## Licence
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

---
_Source: https://npm.io/package/security-txt-node-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
