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

cobblinc

v1.0.0

Published

![CobbLinc logo](assets/transit-logo.png)

Readme

CobbLinc TypeScript client

CobbLinc logo

Unofficial community project. This repository is not affiliated with, endorsed by, sponsored by, or maintained by CobbLinc or Cobb County Government. For official transit information, visit CobbLinc.

A small Node.js client for CobbLinc bus vehicle positions and trip updates from GTFS Realtime feeds.

Returns decoded feed snapshots with the original GTFS Realtime fields preserved. No API key is required.

Getting started

Use Node.js 24+ to run the TypeScript source directly. From this directory:

npm ci

Create example.ts alongside app.ts:

import BusService from './app.ts';
import type { BusFeed } from './app.ts';

const buses = new BusService();

const positions: BusFeed = await buses.getPositions();
for (const entity of positions.entity) {
  if (!entity.vehicle) continue;

  console.log({
    vehicleId: entity.vehicle.vehicle?.id,
    routeId: entity.vehicle.trip?.routeId,
    position: entity.vehicle.position,
  });
}

const updates = await buses.getUpdates();
for (const entity of updates.entity) {
  if (!entity.tripUpdate) continue;

  console.log({
    tripId: entity.tripUpdate.trip.tripId,
    stopTimeUpdates: entity.tripUpdate.stopTimeUpdate,
  });
}

Run it with:

node example.ts

Importing the module and constructing a client perform no requests. Running node app.ts on its own produces no output; call a client method to fetch data.

API

BusService is the default export. BusFeed is a TypeScript type alias for the FeedMessage decoded by gtfs-realtime-bindings.

| Method | Returns | Request timeout | | --- | --- | --- | | getPositions() | Promise<BusFeed> containing vehicle positions | 20 seconds | | getUpdates() | Promise<BusFeed> containing trip updates | 20 seconds |

Each call fetches a fresh snapshot, decodes the protobuf response, and verifies the decoded message. The complete feed is returned, including its header and entities. The client does not filter cancellations or normalize provider data.

Fields such as vehicle descriptors, positions, and stop-time updates may be absent. Check optional fields before using them. Protobuf 64-bit values can be Long objects rather than JavaScript numbers.

Feed endpoints

Errors and limitations

Requests reject on non-2xx HTTP responses, network failures, timeouts, protobuf decoding failures, or decoded-message validation failures. There are no automatic retries or caches.

An HTTP 200 response does not guarantee a valid feed. The provider can return a plain-text error with a successful status; the current client attempts to decode that body as protobuf, which can result in an invalid wire type error.

The current API covers vehicle positions and trip updates. It does not include service alerts, static schedules, historical data, or normalized arrival records.

Development status

This package currently supports direct source usage. Its package.json declares the name cobblinc, but the main entry points to index.js, which is not present. There is no build script or configured TypeScript declaration output; package-root imports are not ready for use.

The npm test script is a placeholder that exits with an error. An automated test suite has not been configured.

License

ISC, as declared in package.json.

The CobbLinc name and logo belong to their respective owners and are used only to identify the transit service. Their inclusion does not imply endorsement. The logo is sourced from the CobbLinc bus tracker and is not covered by this project's software license.