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

pob-parser

v1.0.2

Published

Path of Building (PoB) import code and pobb.in URL parser

Downloads

59

Readme

pob-parser

A high-performance, robust, and zero-dependency library for parsing, encoding, decoding, and fetching Path of Building (PoB) import codes and pobb.in links. Available in both TypeScript/JavaScript (npm) and Rust (crates.io).

Features

  • Zero external dependencies (JS/TS version) using modern Web Streams.
  • High performance and safe encoding/decoding using base64 and zlib.
  • Link parsing and retrieval: Resolves standard and user-profile URLs for pobb.in to fetch the raw import codes.
  • Idiomatic Rust version with conditional async/blocking fetching using features.
  • Local playground demo: A minimal, terminal-inspired web application included in the repository to test, edit, and re-encode builds.

Installation

TypeScript / JavaScript (npm)

npm install pob-parser

Rust (crates.io)

Add to your Cargo.toml:

[dependencies]
pob-parser = "1.0.2"

To enable HTTP fetching (async/blocking):

pob-parser = { version = "1.0.2", features = ["fetch", "blocking"] }

Quick Start Examples

TypeScript / JavaScript

import { encode, decode, parseUrl, fetchRawCode, fetchAndDecode } from 'pob-parser';

// 1. Decode a PoB code to XML
const pobCode = "eJzLSM3JyVcozy/KSQEAGgsEXQ=="; // "hello world" compressed
const xml = await decode(pobCode);
console.log(xml); // "hello world"

// 2. Encode XML to PoB Code
const newPobCode = await encode(xml);
console.log(newPobCode); // "eJzLSM3JyVcozy_KSQEAGgsEXQ" (URL-safe, no padding)

// 3. Parse a pobb.in URL
const parsed = parseUrl("https://pobb.in/eQVFNoqVZrza");
console.log(parsed);
// { id: 'eQVFNoqVZrza', rawUrl: 'https://pobb.in/eQVFNoqVZrza/raw' }

// 4. Fetch and decode from pobb.in
const fetchedXml = await fetchAndDecode("https://pobb.in/eQVFNoqVZrza");
console.log(fetchedXml);

Rust

use pob_parser::{decode, encode, parse_url};

fn main() -> Result<(), pob_parser::Error> {
    // 1. Decode PoB code
    let xml = decode("eJzLSM3JyVcozy/KSQEAGgsEXQ==")?;
    println!("{}", xml); // "hello world"

    // 2. Encode XML
    let encoded = encode(&xml)?;
    println!("{}", encoded); // "eJzLSM3JyVcozy_KSQEAGgsEXQ"
    
    // 3. Parse pobb.in link
    let parsed = parse_url("https://pobb.in/eQVFNoqVZrza").unwrap();
    println!("Raw URL: {}", parsed.raw_url);
    
    Ok(())
}

// 4. Fetch and decode (requires the "fetch" feature)
#[cfg(feature = "fetch")]
async fn fetch_example() -> Result<(), pob_parser::Error> {
    let xml = pob_parser::fetch_and_decode("https://pobb.in/eQVFNoqVZrza", None).await?;
    println!("{}", xml);
    Ok(())
}

Local Playground

Run Locally with CORS Proxy

Since browsers block cross-origin requests (CORS) when executing client-side fetches directly to pobb.in, a local dev server with a built-in proxy is provided for testing:

  1. Build the library bundles:
    cd js
    npm run build
  2. Start the dev server:
    npm start
  3. Open http://localhost:3000 in your browser to access the playground.

Credits