0.2.0 • Published 7 years ago

vbb-line-variant-score v0.2.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

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.