npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@herodevs/eol-shared

v0.1.23

Published

A TypeScript utility library for End-of-Life (EOL) scanning and analysis.

Readme

@herodevs/eol-shared

A TypeScript utility library for End-of-Life (EOL) scanning and analysis.

Installation

npm install github:herodevs/eol-shared

Requirements

  • Node.js 22 or higher

API

spdxToCdxBom(spdxBom: SPDX23): CdxBom

Converts an SPDX BOM to CycloneDX format. This conversion takes the most important package and relationship data from SPDX and translates them into CycloneDX components and dependencies as closely as possible.

import { spdxToCdxBom } from '@herodevs/eol-shared';
import type { CdxBom } from '@herodevs/eol-shared';

const spdxBom = {
  /* your SPDX BOM data */
};
const cdxBom: CdxBom = spdxToCdxBom(spdxBom);

Parameters: spdxBom - The SPDX BOM object to convert
Returns: A CycloneDX BOM object

xmlStringToJSON(xmlString: string): CdxBom

Converts a CycloneDX XML string to a JSON object. The CycloneDX spec does not change between formats, so conversion from XML to JSON is lossless.

import { xmlStringToJSON } from '@herodevs/eol-shared';
import type { CdxBom } from '@herodevs/eol-shared';

const xmlString = `<?xml version="1.0"?>...`;
const jsonBom: CdxBom = xmlStringToJSON(xmlString);

Parameters: xmlString - The XML string to parse
Returns: The parsed CycloneDX BOM object

trimCdxBom(cdxBom: CdxBom): CdxBom

Creates a trimmed copy of a CycloneDX BOM by removing SBOM data not necessary for EOL scanning:

  • externalReferences from components
  • evidence from components
  • hashes from components
  • properties from components
import { trimCdxBom } from '@herodevs/eol-shared';
import type { CdxBom } from '@herodevs/eol-shared';

const originalBom: CdxBom = {
  /* your CycloneDX BOM */
};
const trimmedBom: CdxBom = trimCdxBom(originalBom);

Parameters: cdxBom - The CycloneDX BOM to trim
Returns: A new trimmed CycloneDX BOM object

Types

The package exports the following TypeScript types:

BOM

  • CdxBom - CycloneDX BOM structure as exported from @cyclonedx/cyclonedx-library
  • Component - Component definition
  • Dependency - Dependency relationship
  • Hash - Hash/checksum information
  • License - License information
  • ExternalReference - External reference data
  • ComponentScope - Component scope enumeration

EOL

  • CveStats - CVE statistics with ID, CVSS score, and publication date
  • EolScanComponentMetadata - Metadata for a resolved EOL scan component including EOL status, dates, reasons, and CVE information
  • UnknownComponentMetadata - Metadata for an unknown/unresolvable component, carrying only an unknownReason
  • ComponentMetadata - Union of EolScanComponentMetadata and UnknownComponentMetadata; the type of EolScanComponent.metadata
  • UnknownReason - Reason a component is unknown (not_identifiable, no_listed_versions, unsupported_ecosystem, queued)
  • EolScanComponent - Component data for EOL scanning with metadata, PURL, and optional NES remediation
  • EolReportMetadata - Report-level metadata including component counts
  • EolReport - Complete EOL scan report with components and metadata
  • EolReportQueryResponse - GraphQL response type for EOL report queries
  • EolReportMutationResponse - GraphQL response type for EOL report mutations
  • CreateEolReportInput - Input parameters for creating new EOL reports
  • ComponentStatus - Component status enumeration (UNKNOWN, OK, EOL, EOL_UPCOMING)

Resources

This package is designed to work with:

  • CycloneDX - Industry standard for Software Bill of Materials
  • SPDX - Software Package Data Exchange standard