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

@fynlink/nochain

v0.1.1

Published

Fast short URL domain checker to prevent redirect chains

Downloads

24

Readme

@fynlink/nochain

Fast detection of known short URL domains for browser and Node.js runtimes.

Why this package

This package is designed for anti-chain-shortening enforcement (for example, blocking redirects to another known shortener).

  • Very fast runtime checks using pre-generated in-memory map lookups
  • Browser-safe and Node.js-safe (no runtime dependencies)
  • Includes normalization utilities for domain/URL input
  • Includes an updater script to regenerate the generated map from the canonical local source list

Installation

npm install @fynlink/nochain

Usage

import { isKnownShortUrlDomain } from '@fynlink/nochain';

isKnownShortUrlDomain('bit.ly'); // true
isKnownShortUrlDomain('https://tinyurl.com/example'); // true
isKnownShortUrlDomain('example.com'); // false

Runtime manual domain list

If your application has extra short domains, create a matcher once with your manual list and reuse it:

import { createShortUrlDomainMatcher } from '@fynlink/nochain';

const isShortUrlDomain = createShortUrlDomainMatcher([
  'manual-short-domain.example',
  'custom.manual-link.test'
]);

isShortUrlDomain('https://manual-short-domain.example/abc'); // true
isShortUrlDomain('sub.custom.manual-link.test'); // true
isShortUrlDomain('https://bit.ly/abc123'); // true (built-in list still applies)
isShortUrlDomain('example.com'); // false

createShortUrlDomainMatcher is a one-time setup for the provided list. If the list changes, create a new matcher instance.

API

  • isKnownShortUrlDomain(domainOrUrl: string): boolean
  • createShortUrlDomainMatcher(additionalDomains: Iterable<string>): (domainOrUrl: string) => boolean
  • normalizeDomain(input: string): string | null
  • SHORT_URL_DOMAINS: readonly string[]
  • SHORT_URL_DOMAIN_COUNT: number

Data updates

Regenerate the dataset:

npm run update:domains --workspace @fynlink/nochain

Current source inputs are documented in NOTICE and embedded in the generated source file header.