current-regio-speed

Get the speed of the Regio (RE/RB) train you're sitting in.

Usage no npm install needed!

<script type="module">
  import currentRegioSpeed from 'https://cdn.skypack.dev/current-regio-speed';
</script>

README

current-regio-speed

Get the speed of the Regio (RE/RB) train you're sitting in.

npm version ISC-licensed chat on gitter support me on Patreon

Usage

npx current-regio-speed
# 131 km/h
npx current-regio-speed --json
# 131
npx current-regio-speed --json # in a tunnel
# null
npx current-regio-speed --refresh 5 # refresh speed every 5 seconds

API

speed()

Returns a Promise that resolves with the current speed in km/h.

Contributing

If you have a question or have difficulties using current-regio-speed, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.