Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vbb-line-variant-score

derhuerst9ISC0.2.0

Identify the canonical variants of a VBB line.

public transport, transit, vbb, berlin

readme

vbb-line-variant-score

Identify the canonical variants of a VBB line.

npm version build status ISC-licensed chat with me on Gitter support me on Patreon

Installing

npm install vbb-line-variant-score

Usage

const readLines = require('vbb-lines')

readLines()
.on('data', (line) => {
    const computeLineVariantScore = create(line.variants)

    for (let variant of line.variants) {
        console.log(
            computeLineVariantScore(variant),
            variant
        )
    }
})

Most VBB lines have 1 "canonical" set of stations, hence 2 "canonical" variants. They will be the 2 variants with the highest score.

Contributing

If you have a question or have difficulties using vbb-line-variant-score, 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.