search-flix-locations
Search for Flix/Flixbus/Meinfernbus regions & stations.
Installing
npm install search-flix-locations
Usage
const pick = const search = console
id: '88' name: 'Berlin' type: 'region' relevance: 3455855112783178 score: 27984681385568972 weight: 531 id: '1224' name: 'Berlin Alexanderplatz' type: 'station' relevance: 1727927556391589 score: 7743542752920189 weight: 90 id: '481' name: 'Berlin Südkreuz' type: 'station' relevance: 1727927556391589 score: 7445414138704126 weight: 80 id: '471' name: 'Berlin SXF' type: 'station' relevance: 1727927556391589 score: 7121282437290776 weight: 70 id: '2825' name: 'Berlin Zoo' type: 'station' relevance: 1727927556391589 score: 5369072671153364 weight: 30
If you set fuzzy
to true
, words with a Levenshtein distance <= 3
will be taken into account. This is a lot slower though.
Contributing
If you have a question, found a bug or want to propose a feature, have a look at the issues page.