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

danish-football-clubs

v1.2.13

Published

Club data and DBU utilities for Danish youth football

Downloads

147

Readme

danish-football-clubs

A static dataset and utility library of 696 Danish football clubs, scraped from dbu.dk. Provides consistent club naming, SVG badge fallbacks, and DBU age-group utilities for football apps.

Built for and used in Opstillingen.dk — a lineup builder for Danish youth football coaches.

Installation

npm install github:rasmuslandgreen/danish-football-clubs

To update to the latest version:

npm update danish-football-clubs

Usage

import { clubs, getClub, clubBadgeUrl, getULevel, getMatchFormat } from 'danish-football-clubs';

Club data

// Full list of 696 clubs
clubs; // [{ name, city, postal, region, dbuId, color, logo }, ...]

// Exact-name lookup (returns a fallback stub if not found)
const club = getClub('Brøndby IF');
// { name: 'Brøndby IF', city: 'Brøndby', postal: '2605', region: 'Hovedstaden', dbuId: 3700, color: null, logo: null }

Badge rendering

// SVG data URL — drop directly into an <img src>
const src = club.logo ?? clubBadgeUrl(club.name);
// <img src={src} alt={club.name} />

When no logo is available, clubBadgeUrl returns a light grey circle with the club abbreviation in muted grey — same <img> tag either way.

Abbreviations

import { clubAbbreviation } from 'danish-football-clubs';

clubAbbreviation('FC København');     // FCK
clubAbbreviation('Boldklubben Vestia'); // BKV
clubAbbreviation('Vanløse IF');       // VIF
clubAbbreviation('B 1909');           // B1909

DBU age groups

getULevel(2014);      // 'U12'
getMatchFormat(2014); // '8v8'

| Age | U-level | Format | |-----|---------|--------| | ≤ 7 | U7 | 3v3 | | ≤ 10 | U10 | 5v5 | | ≤ 12 | U12 | 8v8 | | 13+ | U13+ | 11v11 |

Club data model

{
  "name":           "Brøndby IF",
  "city":           "Brøndby",
  "postal":         "2605",
  "region":         "Hovedstaden",
  "dbuId":          3700,
  "primaryColor":   null,
  "secondaryColor": null,
  "kitStyle":       null,
  "logo":           null
}

| Field | Description | |---|---| | region | One of: Hovedstaden, Sjælland, Fyn, Jylland, Bornholm | | primaryColor | Primary brand colour as hex — null until set | | secondaryColor | Secondary brand colour as hex — null until set | | kitStyle | regular, vertical-stripes, horizontal-stripes, or half-splitnull until set | | logo | Not bundled — logos are served separately by dbuId from your own storage |

Stored shape (when a user selects a club)

{ "clubName": "Vanløse IF", "clubId": 1545, "clubSource": "dbu" }

Custom club (typed but not found in the list):

{ "clubName": "Himmelev Boldklub", "clubId": null, "clubSource": "custom" }

Logo workflow

  1. Export logos as PNG named by dbuId (e.g. 1567.png)
  2. Drop files into assets/logos/
  3. Run npm run logos — updates clubs.json and rebuilds index.js

Supported formats: .png, .jpg, .jpeg, .svg, .webp

Scripts

npm run build    # clubs.json → index.js
npm run logos    # Scan assets/logos/ → update clubs.json + rebuild index.js
npm run scrape   # Re-scrape dbu.dk → clubs.json  (~60–90 min, requires Playwright)
npm run figma    # Generate figma-plugin/code.js for the Figma badge artboard plugin

See SCRAPING.md for the full update workflow.

Development

clubs.json is the source of truth. index.js is generated — never edit it directly.

danish-football-clubs/
  index.js          # Generated — do not edit
  clubs.json        # Edit this, then run npm run build
  assets/logos/     # Club logo images, named by dbuId
  scripts/
    scrapeClubs.js
    buildIndex.js
    mergeLogos.js
    buildFigmaPlugin.js
  figma-plugin/     # Generates one artboard per club in Figma

License

MIT © Rasmus Landgreen