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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ntrip-sourcetable-parser

v1.0.12

Published

> TypeScript utility to fetch and decode NTRIP sourcetables (e.g., from GNSS casters)

Readme

ntrip-sourcetable-parser

TypeScript utility to fetch and decode NTRIP sourcetables (e.g., from GNSS casters)

npm version Docs Build


✨ Features

  • Parses sourcetable responses from NTRIP casters (e.g., positionz-rt.linz.govt.nz:2101)
  • Extracts mountpoint metadata
  • Fully typed for TypeScript
  • Compatible with Node.js

📦 Installation

npm install ntrip-sourcetable-parser

🚀 Usage & Example

import { ntripSourcetableParser } from 'ntrip-sourcetable-parser'

const options = {
  host: 'positionz-rt.linz.govt.nz',
  port: 2101,
}

// Example #1 - Then...Catch
ntripSourcetableParser(options)
  .then((mountpoints) => {
    console.log(mountpoints)
  })
  .catch(console.error)

// Example #2 - Async/Await
async function fetchMountpoints() {
  try {
    const mountpoints = await ntripSourcetableParser(options)
    console.log(mountpoints)
  } catch (error) {
    console.error(error)
  }
}
fetchMountpoints()

// Example #3 - Filtering Results
async function fetchAndFilterMountpoints() {
  try {
    const mountpoints = await ntripSourcetableParser(options)
    const freeMountpoints = mountpoints.filter((mp) => !mp.fee)
    console.log('Free mountpoints:', freeMountpoints)
  } catch (error) {
    console.error('Error fetching or filtering mountpoints:', error)
  }
}
fetchAndFilterMountpoints()

// Example #4 - Graceful Error Handling
async function fetchWithGracefulErrorHandling() {
  try {
    const mountpoints = await ntripSourcetableParser(options)
    console.log('Successfully fetched mountpoints:', mountpoints)
  } catch (error) {
    if (error.message.includes('network')) {
      console.error('Network error occurred. Please check your connection.')
    } else {
      console.error('An unexpected error occurred:', error)
    }
  }
}
fetchWithGracefulErrorHandling()

// Example #5 - Chaining Multiple Async Calls
async function fetchAndProcessMountpoints() {
  try {
    const mountpoints = await ntripSourcetableParser(options)
    const processedMountpoints = mountpoints.map((mp) => ({
      ...mp,
      description: `${mp.mountpoint} (${mp.country})`,
    }))
    console.log('Processed mountpoints:', processedMountpoints)
  } catch (error) {
    console.error('Error processing mountpoints:', error)
  }
}
fetchAndProcessMountpoints()

// Example #6 - Using with Custom Configuration
async function fetchWithCustomConfig() {
  const customOptions = {
    host: 'example-rtk-caster.com',
    port: 8080,
    username: 'user',
    password: 'pass',
    position: { lat: 40.7128, lon: -74.006 },
    version: '2.0',
  }

  try {
    const mountpoints = await ntripSourcetableParser(customOptions)
    console.log('Mountpoints from custom caster:', mountpoints)
  } catch (error) {
    console.error('Error fetching from custom caster:', error)
  }
}
fetchWithCustomConfig()

🛠 Build & Docs

npm install
npm run build         # Compile TypeScript
npm run docs          # Generate documentation in ./docs
npm run test          # Test
npm run test:coverage # Test with Coverage

🤝 Contributing

We welcome contributions! To add a new feature, please use a branch name in the format:

  • feature/{name-of-your-feature}
  • bugfix/{name-of-your-feature}

Steps to contribute:

  1. Fork the repository on GitHub.
  2. Clone your fork to your local machine:
    git clone https://github.com/your-username/ntrip-sourcetable-parser.git
  3. Create a new branch for your feature / bugfix:
    git checkout -b feature/{name-of-your-feature}
  4. Make your changes and add tests if applicable.
  5. Run the tests to ensure everything works:
    npm run test
  6. Commit your changes:
    git add .
    git commit -m "Feature {PR# }: Add <description of your feature>"
  7. Push to your fork
  8. Open a Pull Request on Github and describe your changes