Skip to content
19 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Merge site-audit: SEO routes, analytics with consent first in Europe, security page, founder and X account, docs header; the tour opens on the pull request and leads with Code, on the real shell, with Agents and Docs working today1import assert from "node:assert/strict";
2import { test } from "node:test";
3
4import { asksFirst, choice, consentRequired } from "./analytics-consent.ts";
5
6test("visitors from the EU, EEA, UK and Switzerland are asked first", () => {
7 for (const country of ["DE", "fr", "IE", "NO", "IS", "GB", "CH"]) assert.equal(asksFirst(country), true, country);
8});
9
10test("others are not, nor is a visitor whose country is unknown", () => {
11 for (const country of ["US", "CA", "AU", "JP", "BR"]) assert.equal(asksFirst(country), false, country);
12 assert.equal(asksFirst(null), false);
13 assert.equal(asksFirst(""), false);
14});
15
16test("on the server nothing is chosen or required", () => {
17 assert.equal(choice(), null);
18 assert.equal(consentRequired(), false);
19});

This file's history is long; its oldest lines are credited to the oldest commit read.