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

@tracepass/dpp-validate

v0.2.0

Published

Evaluate an EU Digital Product Passport against its category field-spec — a three-tier compliance verdict with regulation-cited findings. Pure functions, no third-party runtime dependencies.

Readme

@tracepass/dpp-validate

Evaluate an EU Digital Product Passport against its category field spec. Pure functions, no third-party runtime dependencies, 28 tests.

License Dependencies

Part of tracepass-open · Maintained by TracePass


Given a passport and the template for its product category, evaluateCompliance returns a three-tier verdict with findings that cite the article of EU law each one rests on. It reads no database, opens no socket, and consults no clock.

npm install @tracepass/dpp-validate @tracepass/dpp-schemas
import { evaluateCompliance } from "@tracepass/dpp-validate";

const result = evaluateCompliance(passport, batteryTemplate, "battery");

result.verdict;               // "compliant" | "compliant_with_warnings" | "incomplete"
result.critical;              // findings that block
result.warnings;              // findings that don't
result.conditionalCoverage;   // "evaluated" | "static-only"
result.checkedRules;          // ["static:required-fields", ..., "BAT-1", "CC-1"]

Three tiers

Static — required fields are present and approved, required economic operators are identified, values match their datatype, enum, pattern, and bounds.

Conditional — obligations that only fire under a condition. Battery carbon-footprint fields apply only to rechargeable batteries; REACH Article 33 disclosure triggers above 0.1% w/w of an SVHC. Three categories carry these rules — battery, chemicals, construction — plus one cross-cutting rule for every category.

Coverage — the engine reports whether it evaluated conditionals at all. For the other nine categories conditionalCoverage is "static-only", so silence is never mistaken for a compliance claim.

It will not pass what it could not check

When the field that decides a conditional is absent, the result is an unverifiable_conditional warning naming what could not be determined — never a quiet pass:

{
  "type": "unverifiable_conditional",
  "ruleId": "BAT-1",
  "target": "batteryCategory",
  "article": "Art. 77(1)",
  "why": "Battery category isn't set, so battery-passport scope couldn't be evaluated.",
  "fix": "Set batteryCategory. Portable and SLI batteries are out of scope; LMT, EV and industrial >2 kWh require a battery passport."
}

The same principle governs the battery applicability gates: an unknown classifier shows the dependent field and warns. A mis-classified battery must never silently lose a legally-required field.

Not legal advice

A compliant verdict means this passport satisfies the rules encoded here — not this product may be placed on the market. Delegated acts are still landing. Verify against EUR-Lex.

License

Apache-2.0