Skip to content

Instantly share code, notes, and snippets.

@hendrixroa
Created March 1, 2023 02:03
Show Gist options
  • Save hendrixroa/865d0f3676e8e244388be5520dfb4ae8 to your computer and use it in GitHub Desktop.
Save hendrixroa/865d0f3676e8e244388be5520dfb4ae8 to your computer and use it in GitHub Desktop.
private filterSummaryData(vulnerabilities: string []): AuditData {
const summary: string | undefined =
vulnerabilities.find((item: string) => {
const itemParsed: any = JSON.parse(item);
return itemParsed.type === 'auditSummary';
}) || '{}';
const summaryData: any = JSON.parse(summary);
return summaryData as AuditData;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment