keystroke-counter

1.0.1 • Public • Published

Keystroke Counter

Keystroke Counter is a library to analyze how many keystrokes a word in each language takes.

Usage

import keystrokeCounter from 'keystroke-counter';
 
keystrokeCounter.analyze("Test")); # default language is english, returns 5
keystrokeCounter.analyze("Äpfel", "ger")); # returns 6
keystrokeCounter.analyze("Œdipe", "fre")); # returns 9
keystrokeCounter.analyze("있다", "kor")); # returns 6

Supported languages

Catalan
Chinese
Czech
Danish
Dutch
English
Esperanto
French
German
Greek
Hindi
Icelandic
Italian
Japanese
Korean
Latvian
Lithuanian
Persian
Polish
Portuguese
Romanian
Spanish
Turkish
Vietnamese

Attention

Languages japanese and korean have a word based calculation, so if the word is not included, the calculated keystrokes will be zero. For chinese the calculation is greatly simplified, as each character just counts as 5. Please let me know if there is a more accurate way to calculate the keystrokes for these languages.

Contributing

Please write me an email to go4christian@gmail.com if you want to contribute, as I'm new to the whole pull request/collaborate coding thing.

License

MIT

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i keystroke-counter

      Weekly Downloads

      6

      Version

      1.0.1

      License

      ISC

      Unpacked Size

      16.3 kB

      Total Files

      4

      Last publish

      Collaborators

      • christianstrang