How to use the hafas-client/parse.movement function in hafas-client

To help you get started, we’ve selected a few hafas-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github derhuerst / vbb-hafas / lib / radar.js View on Github external
.then((d) => {
		if (!Array.isArray(d.jnyL)) return []
		for (let l of d.locations) {
			if (l.type === 'station') = shorten(

		const movements =, d.locations, d.lines, d.remarks))
		for (let movement of movements) {
			movement.direction = shorten(movement.direction)

		return movements
	}, (err) => {throw err})