vbb-stations-t9

0.0.1 • Public • Published

vbb-stations-t9

T9 search (search via telephone keyboard) for VBB public transport stations.

npm version Build status Greenkeeper badge License

Installation

npm install vbb-stations-t9

Usage

The module uses the language-independent/latin keypad from the telephone-keypads module to match numbers with text and additionaly replaces spaces with 0.

// subset of the used keyboard (there are actually more than just
// 3 letters associated with the number 2, e.g. 'ä' or 'á')
// -------------------------
// |       |  ABC  |  DEF  |
// |   1   |   2   |   3   |
// -------------------------
// |  GHI  |  JKL  |  MNO  |
// |   4   |   5   |   6   |
// -------------------------
// | PQRS  |  TUV  | WXYZ  |
// |   7   |   8   |   9   |
// -------------------------
// |       |       |       |
// |   *   |   0   |   #   |
const search = require('vbb-stations-t9')

search('966') // "zoo" -> top result is "zoologischer garten"
search('725707849') // "pakr ruhw" (sic!) -> top result is "park ruhwald"

Acknowledgements

This module uses a lot of logic originally written by @derhuerst for his vbb-stations-autocomplete package.

Contributing

If you found a bug or want to propose a feature, feel free to visit the issues page.

Package Sidebar

Install

npm i vbb-stations-t9

Weekly Downloads

2

Version

0.0.1

License

ISC

Unpacked Size

800 kB

Total Files

11

Last publish

Collaborators

  • juliuste