![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Raw data about when VBB trains stop at which stations. Computed from open GTFS data.
npm install vbb-trips
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.
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
}]
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
// …
]
}
If you have a question, found a bug or want to propose a feature, have a look at the issues page.
FAQs
When do trains run where in VBB?
The npm package vbb-trips receives a total of 11 weekly downloads. As such, vbb-trips popularity was classified as not popular.
We found that vbb-trips demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.