Skip to content

Commit

Permalink
docs: mention skipValidation
Browse files Browse the repository at this point in the history
  • Loading branch information
tale committed May 15, 2022
1 parent 76eee74 commit 8d4b585
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,18 @@ interface IPackages extends Array<IPackage> {
constructor(rawData: string) // Pass in the raw contents of the file
}
```

### Skipping Validation
The parser validates required fields based on the parameters defined by the Debian Team on their documentation pages. Disabling this validation is possible, but it is not recommended if you are parsing valid repositories.

Disabling this validation will stop the APT parser from throwing any `MissingRequiredKeyError`s. It is disabled through an option when constructing your parser.

```ts
import axios from 'axios';
import { Packages } from 'apt-parser';

const { data } = await axios.get('https://repo.chariz.com/Packages');
const packages = new Packages(data, {
skipValidation: true
});
```

0 comments on commit 8d4b585

Please sign in to comment.