Skip to content

derhuerst/vbb-line-variant-score

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.