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

@immo24/decoder

v0.1.1

Published

Decode encoded address data from ImmoScout24 listings

Readme

@immo24/decoder

npm version Tests License

Decodes encoded address data from ImmoScout24 listing pages.

ImmoScout24 embeds address information in the page as a Base64-encoded JSON string inside the obj_telekomInternetUrlAddition property. This package extracts and decodes that data into a structured Address object.

Installation

npm install @immo24/decoder

Usage

import { decodeAddress } from '@immo24/decoder';

// Encoded string extracted from the ImmoScout24 page source
const encoded = '...';

const address = decodeAddress(encoded);
if (address) {
  console.log(address.street);      // e.g. "Musterstraße"
  console.log(address.houseNumber); // e.g. "42"
  console.log(address.postalCode);  // e.g. "10115"
  console.log(address.city);        // e.g. "Berlin"
  console.log(address.district);    // e.g. "Mitte"
}

Finding the encoded string

The encoded address is embedded in the page HTML as a JSON property:

"obj_telekomInternetUrlAddition": "<encoded-value>"

You can extract it from the page source via a regex:

const match = html.match(/"obj_telekomInternetUrlAddition"\s*:\s*"([^"]+)"/);
const encoded = match?.[1] ?? null;
const address = decodeAddress(encoded);

API

decodeAddress(encoded: string | null): Address | null

Decodes an encoded address string. Returns null if the input is null, empty, or cannot be decoded.

Address

interface Address {
  street: string;
  houseNumber: string;
  postalCode: string;
  city: string;
  district: string;
}

Advanced usage

For custom decoding strategies, the underlying building blocks are also exported:

import {
  DecodingStrategyChain,
  Base64JsonStrategy,
  DirectJsonStrategy,
  type DecodingStrategy
} from '@immo24/decoder';

const chain = new DecodingStrategyChain()
  .addStrategy(new Base64JsonStrategy())
  .addStrategy(new DirectJsonStrategy());

const raw = chain.decode(encoded);

Requirements

Node.js >= 16

License

CC-BY-NC-SA-4.0 — see LICENSE for details.