Gathering detailed insights and metrics for hafas-collect-departures-at
Gathering detailed insights and metrics for hafas-collect-departures-at
Gathering detailed insights and metrics for hafas-collect-departures-at
Gathering detailed insights and metrics for hafas-collect-departures-at
npm install hafas-collect-departures-at
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
6,605
Last Day
1
Last Week
3
Last Month
44
Last Year
712
2 Stars
44 Commits
3 Watching
9 Branches
6 Contributors
Minified
Minified + Gzipped
Latest Version
4.0.1
Package Id
hafas-collect-departures-at@4.0.1
Unpacked Size
6.26 kB
Size
2.85 kB
File Count
5
NPM Version
8.19.3
Node Version
19.1.0
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-40%
3
Compared to previous week
Last month
33.3%
44
Compared to previous month
Last year
-24.1%
712
Compared to previous year
1
8
Utility to collect departures, using any HAFAS client.
1npm install hafas-collect-departures-at
1import {createVbbHafas} from 'vbb-hafas' 2import {createCollectDeps} from 'hafas-collect-departures-at' 3 4const fooStation = '900000100001' 5const hafas = createVbbHafas('my-awesome-program') 6const collectDeps = createCollectDeps(hafas.departures, { 7 departuresOpts: { 8 remarks: true, 9 products: {tram: false}, 10 }, 11}) 12const depsAtFoo = collectDeps(fooStation, Date.now()) 13 14let iterations = 0 15for await (const deps of depsAtFoo) { 16 if (++iterations > 2) break 17 console.log(deps) 18}
while
helperIf you don't like to use the async iteration syntax, there's a helper that works like a regular while
loop:
1import {createCollectDepsWhile} from 'hafas-collect-departures-at/while.js' 2 3const collectWhile = createCollectDepsWhile(vbb.departures) 4 5const shouldPick = (dep, i) => i < 10 6const deps = await collectWhile(fooStation, Date.now(), shouldPick) 7console.log(deps)
collectWhile()
returns a Promise that will resolve with an array of 10 items.
hafas-find-alternative-legs
– Given a hafas-client
journey, get alternatives for each leg from HAFAS.If you have a question or have difficulties using hafas-collect-departures-at
, 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.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/25 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More