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

@tracklane/consent-rules

v0.2.0

Published

A dated, sourced survey of what a jurisdiction requires before measurement may begin. Data, not compliance advice.

Readme

@tracklane/consent-rules

What a jurisdiction requires before measurement may begin, as dated data.

This is not legal advice

Read this before you install it. This package is a survey of published law and regulator guidance, written by software engineers. It is dated, it carries the source it was read from, and it will go out of date.

It tells you what a regime appears to require. It cannot tell you whether your particular site, in your particular business, is compliant. If the answer matters, and it usually does, have somebody qualified read it. The authority that fines you is not a party to this licence, and the controller of the data is you.

Every rule set carries a source. Read them. Where this package and the law disagree, the law is right.

What it does

pnpm add @tracklane/consent-rules
import { rulesFor, surveyedAt } from '@tracklane/consent-rules';

rulesFor('BR');
// { mode: 'opt-out',
//   offer: ['marketing'],
//   defaults: { analytics: 'granted', marketing: 'granted' },
//   source: 'Lei nº 13.709/2018 (LGPD), arts. 7º e 8º, …' }

rulesFor('DE');
// { mode: 'opt-in',
//   offer: ['analytics', 'marketing'],
//   defaults: { analytics: 'denied', marketing: 'denied' },
//   source: 'Telekommunikation-Digitale-Dienste-Datenschutz-Gesetz (TDDDG), §25, …' }

surveyedAt; // '2026-08'

Three answers and nothing else: whether measurement may begin before you ask, which purposes the visitor must be offered a choice about, and what each one defaults to.

offer and defaults are separate because one field cannot carry both facts. In Brazil, analytics defaults to granted and owes the visitor no choice, while marketing defaults to granted and owes one.

Feeding it to a consent store is one call:

import { createConsent } from '@tracklane/consent/browser';

const consent = createConsent({ categories: rulesFor('BR').defaults });

What it never does

It names no vendor, contains no function, and cannot answer "may this be sent". It does not geolocate: you pass a region code, and how you obtained it is yours. An unknown region returns the strictest surveyed configuration, and says so in its source.

Coverage

BR, DE and US-CA, plus the strict fallback for everywhere else. That is a starting point, not a claim of global coverage: a visitor in France or Japan currently gets opt-in with everything denied, which is conservative and possibly stricter than that jurisdiction requires.

Contributions of surveyed jurisdictions are welcome, with the source that supports them.

Documentation

https://tracklane.codar.me/docs/consent/rules/

MIT © Bruno Bertolini