Awesome
vbb-line-variant-score
Identify the canonical variants of a VBB line.
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.