New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vbb-trips

Package Overview
Dependencies
Maintainers
0
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vbb-trips

When do trains run where in VBB?

  • 4.12.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

vbb-trips 🚏

Raw data about when VBB trains stop at which stations. Computed from open GTFS data.

npm version ISC-licensed support me via GitHub Sponsors chat with me on Twitter

Installing

npm install vbb-trips

Usage

const data = require('vbb-trips')

data.lines([promise], [id]) and data.schedules([promise], [id]) return a Promise if promise is true. Otherwise, they return a readable stream in object mode.

lines

data.lines(true, '17289_700') // query a single line
.then(console.log, console.error)

This will give you line objects in the Friendly Public Transport Format.

[{
	type: 'line',
	id: '17289_700',
	operator: '796',
	name: '100',
	mode: 'bus',
	product: 'bus',
	weight: 392507
}]

schedules

data.schedules()
.on('data', console.log)
.on('error', console.error)

This will give you schedule objects in the Friendly Public Transport Format.

{
	type: 'schedule',
	id: 'Z2txwLd',
	route: {
		type: 'route',
		id: 'Z2txwLd',
		line: '4221_700',
		stops: [
			'750000105901' // station IDs
			// …
		]
	},
	sequence: [
		{departure: 0}, // seconds since departure at first stop
		// …
	],
	starts: [
		1509978000 // Unix timestamp at the first stop
		// …
	]
}

Contributing

If you have a question, found a bug or want to propose a feature, have a look at the issues page.

Keywords

FAQs

Package last updated on 10 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc